Skip to content
Closed
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: 1 addition & 3 deletions crates/tui/src/commands/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,7 @@ pub fn set_config_value(app: &mut App, key: &str, value: &str, persist: bool) ->
Err(err) => return CommandResult::error(format!("Failed to save: {err}")),
}
}
return CommandResult::error(format!(
"base_url must be saved with --save; client base URL is loaded from config on startup. Restart and re-open your session after saving."
));
return CommandResult::error("base_url must be saved with --save; client base URL is loaded from config on startup. Restart and re-open your session after saving.".to_string());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The .to_string() call is redundant here because CommandResult::error accepts a &str (or impl Into<String>) directly, as seen in other parts of this file (e.g., lines 34, 438, and 463). Passing the string literal directly is more idiomatic and avoids an unnecessary allocation.

            return CommandResult::error("base_url must be saved with --save; client base URL is loaded from config on startup. Restart and re-open your session after saving.");

}
_ => {}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/tui/src/runtime_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ fn log_directory() -> Option<PathBuf> {
{
return resolve(userprofile);
}
dirs::home_dir().and_then(|h| resolve(h))
dirs::home_dir().and_then(resolve)
}

fn log_file_name(date: &str, pid: u32) -> String {
Expand Down
Loading