Skip to content

Commit

Permalink
fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
elkowar committed Oct 22, 2023
1 parent 7b4c1d1 commit 2bc1b38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/robbb_commands/src/commands/note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub async fn note_list(
.context
.clone()
.map(|link| format!(" - [(context)]({})", link))
.unwrap_or_else(String::new);
.unwrap_or_default();
(
format!(
"[{}] {} - {} ",
Expand Down
2 changes: 1 addition & 1 deletion crates/robbb_commands/src/commands/top.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async fn top_all_values(ctx: Ctx<'_>, fetches: Vec<Fetch>) -> Res<()> {
let mut data: HashMap<FetchField, Vec<String>> = HashMap::new();
for fetch in fetches {
for field_name in FETCH_KEY_ORDER.iter().filter(|&x| !EXCLUDED_FETCH_FIELDS.contains(x)) {
let data_value = data.entry(field_name.clone()).or_insert_with(Vec::new);
let data_value = data.entry(field_name.clone()).or_default();
if let Some(field) = fetch.info.get(field_name) {
data_value.push(field.clone());
}
Expand Down

0 comments on commit 2bc1b38

Please sign in to comment.