mirror of
https://github.com/hulthe/inkopslista.git
synced 2026-09-18 18:03:39 +02:00
Fix clippy lints
This commit is contained in:
+3
-4
@@ -20,14 +20,13 @@ pub use fs::*;
|
||||
mod fs {
|
||||
use super::Config;
|
||||
use anyhow::{Context, Ok};
|
||||
use serde_json;
|
||||
|
||||
const CONFIG_FILE_NAME: &'static str = "config.json";
|
||||
const XDG_PREFIX: &'static str = "inköpslista";
|
||||
const CONFIG_FILE_NAME: &str = "config.json";
|
||||
const XDG_PREFIX: &str = "inköpslista";
|
||||
|
||||
pub fn save_config(address: String) -> Result<(), anyhow::Error> {
|
||||
let xdg_dirs = xdg::BaseDirectories::with_prefix(XDG_PREFIX);
|
||||
let conf = Config { address: address };
|
||||
let conf = Config { address };
|
||||
let conf = serde_json::to_string(&conf).context("unable to serialize config")?;
|
||||
|
||||
let path = xdg_dirs
|
||||
|
||||
Reference in New Issue
Block a user