fn new_tag(siv: &mut Cursive, state: &mut AppState, name: &str) {
    if !name.is_empty() {
        siv.pop_layer();

        let mut path = state.tags_path.clone();
        path.push(name);

        fs::DirBuilder::new()
            .recursive(true)
            .create(&path)
            .expect("could not create dir");

        state.tags.insert(
            path.canonicalize().unwrap(),
            Tag {
                name: name.to_owned(),
                items: HashMap::default(),
            },
        );

        ui_refresh_tagsview(siv, state);
    }
}
/// Create new tag with provided name
Create new tag with provided name
Create new tag with provided name
fn new_tag(siv: &mut Cursive, state: &mut AppState, name: &str) {
    if !name.is_empty() {
        siv.pop_layer();
        let mut path = state.tags_path.clone();
        path.push(name);
        fs::DirBuilder::new()
            .recursive(true)
            .create(&path)
            .expect("could not create dir");
        state.tags.insert(
            path.canonicalize().unwrap(),
            Tag {
                name: name.to_owned(),
                items: HashMap::default(),
            },
        );
        ui_refresh_tagsview(siv, state);
    }
}
fn new_tag ( siv : & mut Cursive , state : & mut AppState , name : & str ) { if ! name . is_empty ( ) { siv . pop_layer ( ) ; let mut path = state . tags_path . clone ( ) ; path . push ( name ) ; fs :: DirBuilder :: new ( ) . recursive ( true ) . create ( & path ) . expect ( " " ) ; state . tags . insert ( path . canonicalize ( ) . unwrap ( ) , Tag { name : name . to_owned ( ) , items : HashMap :: default ( ) , } , ) ; ui_refresh_tagsview ( siv , state ) ; } }
Create new tag with provided name
Create new tag with provided name
siv
&mut Cursive
state
&mut AppState
name
&str