mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-20 03:37:47 +00:00
Fix EXL doc test failures, and one typo
This commit is contained in:
parent
287d807f01
commit
184e794e26
1 changed files with 9 additions and 3 deletions
12
src/exl.rs
12
src/exl.rs
|
@ -44,10 +44,16 @@ impl EXL {
|
|||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```should_panic
|
||||
/// ```
|
||||
/// # use std::fs::read;
|
||||
/// # use std::path::PathBuf;
|
||||
/// # use physis::exl::EXL;
|
||||
/// let exl = EXL::from_existing("root.exl").unwrap();
|
||||
/// exl.contains("Achivements");
|
||||
/// # let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
/// # d.push("resources/tests");
|
||||
/// # d.push("test.exl");
|
||||
/// # let exl_file = read(d).unwrap();
|
||||
/// let exl = EXL::from_existing(&exl_file).unwrap();
|
||||
/// exl.contains("Foo");
|
||||
/// ```
|
||||
pub fn contains(&self, key: &str) -> bool {
|
||||
self.entries.contains_key(key)
|
||||
|
|
Loading…
Add table
Reference in a new issue