From 9e019b462ff05315641c95442faf7f8fc80f76b1 Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 21 Sep 2021 01:04:49 +0200 Subject: Slightly more consistent error handling --- src/actions/create.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/actions/create.rs') diff --git a/src/actions/create.rs b/src/actions/create.rs index 26d20c8..f00e95d 100644 --- a/src/actions/create.rs +++ b/src/actions/create.rs @@ -1,10 +1,12 @@ -use std::{fs, io}; +use std::fs; + +use anyhow::Result; use crate::{actions::update, files::Locations}; use super::ActionOptions; -pub fn create(command_options: ActionOptions) -> io::Result<()> { +pub fn create(command_options: ActionOptions) -> Result<()> { let locations = Locations::from(&command_options); if locations.ka_path.exists() { -- cgit 1.4.1