pub fn load_history(ctx: &mut ggez::Context, settings: &Settings) -> ggez::GameResult<History> {
	let buffer: Result<Vec<_>, _> = ggez::filesystem::open(ctx,
		&settings.save_path)?.bytes().collect();
	toml::from_slice(&buffer?).map_err(|error| {
		let error = format!("Failed to load saved history because: {}", error);
		ggez::GameError::ResourceLoadError(error)
	})
}
/// Loads the game history from the save path in the settings.
Loads the game history from the save path in the settings.
Loads the game history from the save path in the settings .
pub fn load_history(ctx: &mut ggez::Context, settings: &Settings) -> ggez::GameResult<History> {
	let buffer: Result<Vec<_>, _> = ggez::filesystem::open(ctx,
		&settings.save_path)?.bytes().collect();
	toml::from_slice(&buffer?).map_err(|error| {
		let error = format!("Failed to load saved history because: {}", error);
		ggez::GameError::ResourceLoadError(error)
	})
}
pub fn load_history ( ctx : & mut ggez :: Context , settings : & Settings ) -> ggez :: GameResult < History > { let buffer : Result < Vec < _ > , _ > = ggez :: filesystem :: open ( ctx , & settings . save_path ) ? . bytes ( ) . collect ( ) ; toml :: from_slice ( & buffer ? ) . map_err ( | error | { let error = format ! ( " " error ) ; ggez :: GameError :: ResourceLoadError ( error ) } ) }
Loads the game history from the save path in the settings.
Loads the game history from the save path in the settings .
ctx
&mut ggez::Context
settings
&Settings
ctx
&mut ggez::Context
settings
&Settings