cargo fmt

This commit is contained in:
Mike Dilger 2024-09-18 12:20:31 +12:00
parent 2b1c732744
commit 489557c468
4 changed files with 26 additions and 11 deletions

View File

@ -15,9 +15,7 @@ pub fn emoji_picker(ui: &mut Ui) -> Option<char> {
let mut output: Option<char> = None;
ui.vertical(|ui| {
if ui.add(
Button::new("LIKE").small()
).clicked() {
if ui.add(Button::new("LIKE").small()).clicked() {
output = Some('+');
}
});

View File

@ -36,8 +36,10 @@ pub(super) fn enter_feed(app: &mut GossipUi, ctx: &Context, kind: FeedKind) {
.map(|u| u.into_string())
.collect();
if app.global_relays.is_empty() {
app.global_relays
.push("You haven't configured any global relays, else they have errored recently".to_string());
app.global_relays.push(
"You haven't configured any global relays, else they have errored recently"
.to_string(),
);
}
}

View File

@ -926,8 +926,7 @@ pub fn render_note_inner(
.on_hover_cursor(egui::CursorIcon::PointingHand);
bar_state.bar_menu(&button_response, |ui| {
if let Some(emoji) =
crate::ui::emojis::emoji_picker(ui)
if let Some(emoji) = crate::ui::emojis::emoji_picker(ui)
{
let _ = GLOBALS.to_overlord.send(
ToOverlordMessage::React(

View File

@ -113,19 +113,35 @@ impl Profile {
// Create all these directories if missing
fs::create_dir_all(&base_dir).map_err(|e| {
eprintln!("Error creating base directory ({}): {}", base_dir.display(), e);
eprintln!(
"Error creating base directory ({}): {}",
base_dir.display(),
e
);
Error::from(format!("Failed to create base directory: {}", e))
})?;
fs::create_dir_all(&cache_dir).map_err(|e| {
eprintln!("Error creating cache directory ({}): {}", cache_dir.display(), e);
eprintln!(
"Error creating cache directory ({}): {}",
cache_dir.display(),
e
);
Error::from(format!("Failed to create cache directory: {}", e))
})?;
fs::create_dir_all(&profile_dir).map_err(|e| {
eprintln!("Error creating profile directory ({}): {}", profile_dir.display(), e);
eprintln!(
"Error creating profile directory ({}): {}",
profile_dir.display(),
e
);
Error::from(format!("Failed to create profile directory: {}", e))
})?;
fs::create_dir_all(&lmdb_dir).map_err(|e| {
eprintln!("Error creating LMDB directory ({}): {}", lmdb_dir.display(), e);
eprintln!(
"Error creating LMDB directory ({}): {}",
lmdb_dir.display(),
e
);
Error::from(format!("Failed to create LMDB directory: {}", e))
})?;