~matthiasbeyer/imag

e2216db41d78de3a22df3547812aa4c6f122bdf0 — flip1995 2 years ago 0087de7
Allow some Clippy lints

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
M bin/domain/imag-contact/src/create.rs => bin/domain/imag-contact/src/create.rs +1 -0
@@ 232,6 232,7 @@ pub fn create(rt: &Runtime) {
    info!("Ready");
}

#[clippy::cognitive_complexity = "71"]
fn parse_toml_into_vcard(output: &mut dyn Write, input: &mut dyn Read, toml: Value, uuid: String) -> Option<Vcard> {
    let mut vcard = VcardBuilder::new().with_uid(uuid);


M lib/domain/libimagbookmark/src/collection.rs => lib/domain/libimagbookmark/src/collection.rs +2 -0
@@ 51,6 51,7 @@ pub trait BookmarkCollectionStore<'a> {

impl<'a> BookmarkCollectionStore<'a> for Store {

    #[allow(clippy::new_ret_no_self)]
    fn new(&'a self, name: &str) -> Result<FileLockEntry<'a>> {
        crate::module_path::new_id(name)
            .and_then(|id| self.create(id)


@@ 94,6 95,7 @@ impl BookmarkCollection for Entry {
        self.get_urls(store)
    }

    #[allow(clippy::redundant_closure)]
    fn link_entries(&self) -> Result<Vec<StoreLink>> {
        use libimagentryurl::util::is_external_link_storeid;
        self.links().map(|v| v.filter(|id| is_external_link_storeid(id)).collect())

M lib/entry/libimagentrydatetime/src/datetime.rs => lib/entry/libimagentrydatetime/src/datetime.rs +3 -0
@@ 228,6 228,7 @@ mod tests {
    fn test_set_date() {
        let store = get_store();

        #[allow(clippy::zero_prefixed_literal)]
        let date = {
            let date = NaiveDate::from_ymd(2000, 01, 02);
            let time = NaiveTime::from_hms(03, 04, 05);


@@ 260,6 261,7 @@ mod tests {
    }

    #[test]
    #[allow(clippy::zero_prefixed_literal)]
    fn test_read_date() {
        use chrono::Datelike;
        use chrono::Timelike;


@@ 300,6 302,7 @@ mod tests {
    fn test_delete_date() {
        let store = get_store();

        #[allow(clippy::zero_prefixed_literal)]
        let date = {
            let date = NaiveDate::from_ymd(2000, 01, 02);
            let time = NaiveTime::from_hms(03, 04, 05);

M lib/entry/libimagentrydatetime/src/range.rs => lib/entry/libimagentrydatetime/src/range.rs +4 -0
@@ 56,11 56,13 @@ mod tests {

    #[test]
    fn test_new_returns_error_if_start_after_end_date() {
        #[allow(clippy::zero_prefixed_literal)]
        let start = NaiveDateTime::new(
            NaiveDate::from_ymd(2000, 02, 02),
            NaiveTime::from_hms(12, 00, 02)
        );

        #[allow(clippy::zero_prefixed_literal)]
        let end = NaiveDateTime::new(
            NaiveDate::from_ymd(2000, 02, 02),
            NaiveTime::from_hms(12, 00, 01)


@@ 73,11 75,13 @@ mod tests {

    #[test]
    fn test_new_returns_ok_if_start_is_before_end() {
        #[allow(clippy::zero_prefixed_literal)]
        let start = NaiveDateTime::new(
            NaiveDate::from_ymd(2000, 02, 02),
            NaiveTime::from_hms(12, 00, 01)
        );

        #[allow(clippy::zero_prefixed_literal)]
        let end = NaiveDateTime::new(
            NaiveDate::from_ymd(2000, 02, 02),
            NaiveTime::from_hms(12, 00, 02)

M lib/entry/libimagentrylink/src/linkable.rs => lib/entry/libimagentrylink/src/linkable.rs +1 -0
@@ 383,6 383,7 @@ mod test {
    }

    #[test]
    #[clippy::cognitive_complexity = "49"]
    fn test_multiple_links() {
        setup_logging();
        let store = get_store();