File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ pub mod add
52
52
const storagePATH : & str = "rustix/storage.txt" ;
53
53
54
54
55
- fn write_file ( save_info : [ String ; 4 ] ) -> std :: io :: Result < ( ) >
55
+ fn write_file ( save_info : [ String ; 4 ] ) -> bool
56
56
{
57
57
let SAVES_BASE = crate :: database:: get:: start ( ) . unwrap ( ) ;
58
58
let mut UNIQUE_SAVE : bool = true ;
@@ -67,17 +67,11 @@ pub mod add
67
67
println ! ( "Added !" ) ;
68
68
} else { println ! ( "Such a name already exists !" ) ; }
69
69
70
- Ok ( ( ) )
70
+ return UNIQUE_SAVE ;
71
71
}
72
72
73
73
74
74
// START POINT
75
75
pub fn start ( save_info : [ String ; 4 ] ) -> bool
76
- {
77
- if Path :: new ( storagePATH) . exists ( ) == true {
78
- write_file ( save_info) ;
79
- return true ;
80
- }
81
- else { return false ; }
82
- }
76
+ { if ( Path :: new ( storagePATH) . exists ( ) == true ) { return write_file ( save_info) ; } else { return false ; } }
83
77
}
You can’t perform that action at this time.
0 commit comments