aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/identifiers.rs
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2022-10-06 01:56:36 +0000
committerbnewbold <bnewbold@archive.org>2022-10-06 01:56:36 +0000
commite5ee112a13cc331a488d395c4da1f80a9dd61930 (patch)
tree396a6fd04188385217b6e3c0cae4f91069f1ec38 /rust/src/identifiers.rs
parent8bdd5fd92a33cf05424447241033bd529b68af77 (diff)
parent9faf093b50da190a5efee47f3b00bd425a940c40 (diff)
downloadfatcat-e5ee112a13cc331a488d395c4da1f80a9dd61930.tar.gz
fatcat-e5ee112a13cc331a488d395c4da1f80a9dd61930.zip
Merge branch 'bnewbold-rust-macaroons-upstream' into 'master'
rust: refactor closer to 'macaroon' crate See merge request webgroup/fatcat!143
Diffstat (limited to 'rust/src/identifiers.rs')
-rw-r--r--rust/src/identifiers.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/src/identifiers.rs b/rust/src/identifiers.rs
index e9baf7b8..56174be1 100644
--- a/rust/src/identifiers.rs
+++ b/rust/src/identifiers.rs
@@ -5,7 +5,7 @@ use std::str::FromStr;
use std::{convert, fmt};
use uuid::Uuid;
-#[derive(Clone, Copy, PartialEq, Debug)]
+#[derive(Clone, Copy, PartialEq, Debug, Eq)]
pub struct FatcatId(Uuid);
impl fmt::Display for FatcatId {
@@ -51,7 +51,7 @@ impl FatcatId {
/// Convert fatcat IDs (base32 strings) to UUID
pub fn fcid2uuid(fcid: &str) -> Result<Uuid> {
- if fcid.is_ascii() == false || fcid.len() != 26 {
+ if !fcid.is_ascii() || fcid.len() != 26 {
return Err(FatcatError::InvalidFatcatId(fcid.to_string()).into());
}
let mut raw = vec![0; 16];