derive some defaults to make clippy happy
This commit is contained in:
parent
22d16ff5ba
commit
08ff8254d1
|
@ -29,18 +29,14 @@ fn beginning_of_previous_month(time: DateTime<Local>) -> DateTime<Utc> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
enum MonthSpec {
|
||||
Last,
|
||||
#[default]
|
||||
This,
|
||||
Month(u32),
|
||||
}
|
||||
|
||||
impl Default for MonthSpec {
|
||||
fn default() -> MonthSpec {
|
||||
MonthSpec::This
|
||||
}
|
||||
}
|
||||
|
||||
impl FromStr for MonthSpec {
|
||||
type Err = Error;
|
||||
|
||||
|
|
|
@ -12,18 +12,14 @@ use crate::io::Streams;
|
|||
use crate::interactive::note_from_last_entries;
|
||||
use super::{Command, Facts, r#in, sheet};
|
||||
|
||||
#[derive(Default)]
|
||||
enum SelectedEntry {
|
||||
Id(u64),
|
||||
Interactive,
|
||||
#[default]
|
||||
NotSpecified,
|
||||
}
|
||||
|
||||
impl Default for SelectedEntry {
|
||||
fn default() -> Self {
|
||||
SelectedEntry::NotSpecified
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Args {
|
||||
entry: SelectedEntry,
|
||||
|
|
|
@ -15,9 +15,10 @@ pub mod ical;
|
|||
pub mod custom;
|
||||
pub mod chart;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum Formatter {
|
||||
#[default]
|
||||
Text,
|
||||
Csv,
|
||||
Json,
|
||||
|
@ -27,12 +28,6 @@ pub enum Formatter {
|
|||
Custom(String),
|
||||
}
|
||||
|
||||
impl Default for Formatter {
|
||||
fn default() -> Formatter {
|
||||
Formatter::Text
|
||||
}
|
||||
}
|
||||
|
||||
impl Formatter {
|
||||
/// Prints the given entries to the specified output device.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue