Remove unnecessary SaveError
variant in todos
example
This commit is contained in:
parent
80a490ebb9
commit
31522e30aa
@ -489,7 +489,6 @@ enum LoadError {
|
|||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
enum SaveError {
|
enum SaveError {
|
||||||
DirectoryError,
|
|
||||||
FileError,
|
FileError,
|
||||||
WriteError,
|
WriteError,
|
||||||
FormatError,
|
FormatError,
|
||||||
@ -538,7 +537,7 @@ impl SavedState {
|
|||||||
if let Some(dir) = path.parent() {
|
if let Some(dir) = path.parent() {
|
||||||
async_std::fs::create_dir_all(dir)
|
async_std::fs::create_dir_all(dir)
|
||||||
.await
|
.await
|
||||||
.map_err(|_| SaveError::DirectoryError)?;
|
.map_err(|_| SaveError::FileError)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user