pub struct ScopedUserAppDirRemover;
RAII object which removes the user_app_dir()
when an instance is
dropped.
Since the user_app_dir
is frequently created by tests or examples which use Crust, this is a
convenience object which tries to remove the directory when it is destroyed.
use config_file_handler::{FileHandler, ScopedUserAppDirRemover};
{
let _cleaner = ScopedUserAppDirRemover;
let file_handler = FileHandler::new("test.json", true).unwrap();
let _ = file_handler.write_file(&111u64);
}
Executes the destructor for this type. Read more