refactor: apply clippy auto-fixes (162 warnings resolved)
- Fix needless borrows and references - Collapse nested if statements - Replace manual strip_prefix with str::strip_prefix() - Remove redundant closures in map/unwrap_or_else - Use Iterator::next_back() instead of rev().next() - Simplify map_or patterns - Use std::io::Error::other() instead of new(ErrorKind::Other, ..) - Use div_ceil() instead of manual ceiling division - Consolidate format! string arguments - Various other idiomatic Rust improvements 39 files changed, 220 insertions(+), 320 deletions(-)
This commit is contained in:
@@ -262,9 +262,9 @@ mod tests {
|
||||
assert_eq!(share.item_id(), "test_file_id");
|
||||
assert_eq!(*share.item_type(), ShareItemType::File);
|
||||
assert_eq!(share.created_by(), "user123");
|
||||
assert_eq!(share.permissions().read(), true);
|
||||
assert_eq!(share.permissions().write(), false);
|
||||
assert_eq!(share.permissions().reshare(), false);
|
||||
assert!(share.permissions().read());
|
||||
assert!(!share.permissions().write());
|
||||
assert!(!share.permissions().reshare());
|
||||
assert!(!share.has_password());
|
||||
assert!(share.expires_at().is_none());
|
||||
assert_eq!(share.access_count(), 0);
|
||||
|
||||
Reference in New Issue
Block a user