-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π΄ Fetch entities in parallel for real (#70)
- π΄ Fetch entities in parallel for real * Futures are cold, JS brain gaslight me * Use ResultWithDefaultError where applicable --- Co-authored-by: William Barbosa <[email protected]>
- Loading branch information
1 parent
373a0e2
commit e24659e
Showing
13 changed files
with
100 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
use std::path::Path; | ||
use toml; | ||
|
||
use crate::models::ResultWithDefaultError; | ||
|
||
use super::model::TrackConfig; | ||
|
||
pub fn get_config_from_file<P: AsRef<Path>>( | ||
path: P, | ||
) -> Result<TrackConfig, Box<dyn std::error::Error>> { | ||
let contents = std::fs::read_to_string(path)?; | ||
let config: TrackConfig = toml::from_str(&contents)?; | ||
pub fn get_config_from_file<P: AsRef<Path>>(path: P) -> ResultWithDefaultError<TrackConfig> { | ||
let contents = std::fs::read_to_string(path).expect("failed to read config file"); | ||
let config: TrackConfig = toml::from_str(&contents).expect("failed to parse config"); | ||
|
||
Ok(config) | ||
} |
Oops, something went wrong.