Re-add macro_use to atuin-common (#107)

* Re-add macro_use to atuin-common

When build as a dependency, the macro is available from another crate.
When you try to build common by itself, the macro is not found. Magic,
huh?

* chore: remove unneeded use - clippy is confused

Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>
This commit is contained in:
Ellie Huxtable 2021-05-10 22:16:07 +01:00 committed by GitHub
parent d3059af815
commit fe45787474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
use std::{borrow::Cow, convert::Infallible};
use chrono::Utc;
use serde::{Deserialize, Serialize};
use serde::Serialize;
use warp::{reply::Response, Reply};
#[derive(Debug, Serialize, Deserialize)]

View File

@ -1,4 +1,7 @@
#![forbid(unsafe_code)]
#[macro_use]
extern crate serde_derive;
pub mod api;
pub mod utils;

View File

@ -64,6 +64,7 @@ mod tests {
config_dir(),
PathBuf::from("/home/user/custom_config/atuin")
);
env::remove_var("XDG_CONFIG_HOME");
}
#[test]
@ -71,6 +72,7 @@ mod tests {
env::set_var("HOME", "/home/user");
env::remove_var("XDG_CONFIG_HOME");
assert_eq!(config_dir(), PathBuf::from("/home/user/.config/atuin"));
env::remove_var("HOME");
}
#[test]
@ -78,6 +80,7 @@ mod tests {
env::remove_var("HOME");
env::set_var("XDG_DATA_HOME", "/home/user/custom_data");
assert_eq!(data_dir(), PathBuf::from("/home/user/custom_data/atuin"));
env::remove_var("XDG_DATA_HOME");
}
#[test]
@ -85,5 +88,6 @@ mod tests {
env::set_var("HOME", "/home/user");
env::remove_var("XDG_DATA_HOME");
assert_eq!(data_dir(), PathBuf::from("/home/user/.local/share/atuin"));
env::remove_var("HOME");
}
}