diff --git a/Cargo.toml b/Cargo.toml index ca1198e..7783902 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ vendored-tls = ["reqwest/native-tls-vendored"] # lib graphql_client = { version = "0.14", features = ["reqwest-blocking"] } serde = "1.0" -reqwest = { version = "0.11", features = ["json", "blocking", "multipart"] } +reqwest = { version = "0.11", default-features = false, features = ["json", "blocking", "multipart"] } thiserror = "2.0" # cli and fuse clap = { version = "4.4", features = ["derive", "env"], optional = true } @@ -49,7 +49,7 @@ stderrlog = { version = "0.6", optional = true } libc = { version = "0.2", optional = true } chrono = { version = "0.4", optional = true } # cli -tabled = { version = "0.18", optional = true } +tabled = { version = "0.20", optional = true } tempfile = { version = "3.8", optional = true } [dev-dependencies] diff --git a/src/cli/page.rs b/src/cli/page.rs index 2da06e6..1fe6b6b 100644 --- a/src/cli/page.rs +++ b/src/cli/page.rs @@ -415,7 +415,7 @@ fn page_create( None, None, tags.iter().map(|s| Some(s.clone())).collect(), - title.unwrap_or(path.split('/').last().unwrap().to_string()), + title.unwrap_or(path.split('/').next_back().unwrap().to_string()), )?; println!("{}: Page created", "success".bold().green()); Ok(()) @@ -494,8 +494,7 @@ fn page_edit( .spawn()?; let status = child.wait()?; if !status.success() { - return Err(Box::new(IoError::new( - std::io::ErrorKind::Other, + return Err(Box::new(IoError::other( "Editor exited with non-zero status code", ))); } diff --git a/src/fuse/main.rs b/src/fuse/main.rs index 6524c3f..ed46935 100644 --- a/src/fuse/main.rs +++ b/src/fuse/main.rs @@ -348,7 +348,7 @@ impl Filesystem for Fs { if i + 2 <= offset as usize { continue; } - let basename = pti.path.split('/').last().unwrap(); + let basename = pti.path.split('/').next_back().unwrap(); if pti.is_folder { if reply.add( pti.id as u64 + 1, @@ -419,7 +419,7 @@ impl Filesystem for Fs { }; for pti in page_tree { - if pti.path.split('/').last().unwrap() == name_str { + if pti.path.split('/').next_back().unwrap() == name_str { let ino = if is_dir { pti.id as u64 + 1 } else { diff --git a/src/lib/lib.rs b/src/lib/lib.rs index a11aa74..2e0c770 100644 --- a/src/lib/lib.rs +++ b/src/lib/lib.rs @@ -190,7 +190,7 @@ impl Api { /// /// # Arguments /// * `parent_id` - The id of the parent folder to list asset folders from. - /// Use 0 to list all root folders. + /// Use 0 to list all root folders. pub fn asset_folder_list( &self, parent_id: i64, @@ -206,7 +206,7 @@ impl Api { /// /// # Arguments /// * `parent_folder_id` - The id of the parent folder to create the new - /// folder in. Use 0 to create a root folder. + /// folder in. Use 0 to create a root folder. /// * `slug` - The slug of the new folder. /// * `name` - The name of the new folder. pub fn asset_folder_create( @@ -830,7 +830,7 @@ impl Api { /// * `username` - The username to login with. /// * `password` - The password to login with. /// * `strategy` - The authentication strategy to use, for example "local". - /// Use [`authentication_strategy_list`](#method.authentication_strategy_list) + /// Use [`authentication_strategy_list`](#method.authentication_strategy_list) pub fn login( &self, username: String, @@ -1155,10 +1155,8 @@ impl Api { /// * `page_id` - The id of the page to create the comment for. /// * `reply_to` - The id of the comment to reply to. /// * `content` - The content of the comment. - /// * `guest_name` - The name of the guest if the comment is created - /// by a guest. - /// * `guest_email` - The email of the guest if the comment is created - /// by a guest. + /// * `guest_name` - The name of the guest if the comment is created by a guest. + /// * `guest_email` - The email of the guest if the comment is created by a guest. pub fn comment_create( &self, page_id: i64,