// Create a Config struct and store it. This becomes ~/.tipsrc
Create a Config struct and store it. This becomes ~/.tipsrc
Create a Config struct and store it . This becomes ~ / . tipsrc
fn create_tipsrc() {
    let tipsrc = crate::config::Config {
        db_file:     TIPS.get("db_file").unwrap().to_string(),
        tmp_file:    TIPS.get("tmp_file").unwrap().to_string(),
        data:        TIPS.get("data").unwrap().to_string(),
        editor:      TIPS.get("editor").unwrap().to_string(),
        style: crate::config::Style {
            // The cell styles are intentionally set to an empty string,
            // it's up to the user to change this after his/her style
            table: crate::config::TableStyle {
                id: "".to_string(),
                subject: "".to_string(),
                tags: "".to_string(),
            },
            // Let's expect that everyone runs Solarized dark theme... I do
            data: crate::config::DataStyle {
                theme: "Solarized (dark)".to_string(),
            },
        },
    };
    tipsrc.store(TIPS.get("tipsrc").unwrap());
}
fn create_tipsrc ( ) { let tipsrc = crate :: config :: Config { db_file : TIPS . get ( " " ) . unwrap ( ) . to_string ( ) , tmp_file : TIPS . get ( " " ) . unwrap ( ) . to_string ( ) , data : TIPS . get ( " " ) . unwrap ( ) . to_string ( ) , editor : TIPS . get ( " " ) . unwrap ( ) . to_string ( ) , style : crate :: config :: Style { // The cell styles are intentionally set to an empty string, // it's up to the user to change this after his/her style table : crate :: config :: TableStyle { id : " " . to_string ( ) , subject : " " . to_string ( ) , tags : " " . to_string ( ) , } , // Let's expect that everyone runs Solarized dark theme... I do data : crate :: config :: DataStyle { theme : " " . to_string ( ) , } , } , } ; tipsrc . store ( TIPS . get ( " " ) . unwrap ( ) ) ; }
Create a Config struct and store it.
Create a Config struct and store it .