Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand All @@ -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]
Expand Down
5 changes: 2 additions & 3 deletions src/cli/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down Expand Up @@ -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",
)));
}
Expand Down
4 changes: 2 additions & 2 deletions src/fuse/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
12 changes: 5 additions & 7 deletions src/lib/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading