mirror of
https://github.com/clap-rs/clap
synced 2024-12-15 07:12:32 +00:00
imp: Hash for Arg
This commit is contained in:
parent
cc082a0347
commit
2133bd148b
1 changed files with 7 additions and 0 deletions
|
@ -13,6 +13,7 @@ use std::os::unix::ffi::OsStrExt;
|
|||
use std::env;
|
||||
use std::cmp::{Ord, Ordering};
|
||||
use std::str;
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
||||
// Third Party
|
||||
#[cfg(feature = "yaml")]
|
||||
|
@ -4195,6 +4196,12 @@ impl<'n, 'e> Ord for Arg<'n, 'e> {
|
|||
|
||||
impl<'n, 'e> Eq for Arg<'n, 'e> {}
|
||||
|
||||
impl<'n, 'e> Hash for Arg<'n, 'e> {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.name.hash(state);
|
||||
}
|
||||
}
|
||||
|
||||
impl<'n, 'e> fmt::Debug for Arg<'n, 'e> {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
|
||||
write!(
|
||||
|
|
Loading…
Reference in a new issue