~whynothugo/vdirsyncer-rs

afdf3c9c3e747bded1f8d4ed3b62c92239eb31ba — Hugo Osvaldo Barrera 2 months ago a610653
Simplify return
1 files changed, 6 insertions(+), 8 deletions(-)

M vstorage/src/vdir.rs
M vstorage/src/vdir.rs => vstorage/src/vdir.rs +6 -8
@@ 188,13 188,11 @@ where
        let filename = meta.filename();

        let path = self.build_collection_path(href)?.join(filename);
        let value = match read_to_string(path).await {
            Ok(data) => data,
            Err(e) if e.kind() == std::io::ErrorKind::NotFound => return Ok(None),
            Err(e) => return Err(Error::from(e)),
        };

        Ok(Some(value))
        match read_to_string(path).await {
            Ok(value) => Ok(Some(value)),
            Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(None),
            Err(e) => Err(Error::from(e)),
        }
    }

    async fn add_item(&self, collection_href: &str, item: &I) -> Result<ItemRef> {


@@ 293,7 291,7 @@ where
                });
            };
        }
        return Ok(props);
        Ok(props)
    }
}