mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-20 11:47:46 +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
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```should_panic
|
/// ```
|
||||||
|
/// # use std::fs::read;
|
||||||
|
/// # use std::path::PathBuf;
|
||||||
/// # use physis::exl::EXL;
|
/// # use physis::exl::EXL;
|
||||||
/// let exl = EXL::from_existing("root.exl").unwrap();
|
/// # let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
/// exl.contains("Achivements");
|
/// # 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 {
|
pub fn contains(&self, key: &str) -> bool {
|
||||||
self.entries.contains_key(key)
|
self.entries.contains_key(key)
|
||||||
|
|
Loading…
Add table
Reference in a new issue