summaryrefslogtreecommitdiffstats
path: root/rust/src/bin
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-01-09 18:30:48 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-01-09 18:30:48 -0800
commit7632129c594b9edbae8ee9ba5da6ae35d1af2429 (patch)
treedb1c56b35aa4c81ec1c925d527b80caa30f9c06f /rust/src/bin
parent8317f6cb38622e36dad6bd4ad34e3cf6dac3bdad (diff)
downloadfatcat-7632129c594b9edbae8ee9ba5da6ae35d1af2429.tar.gz
fatcat-7632129c594b9edbae8ee9ba5da6ae35d1af2429.zip
refactor: FatCatId -> FatcatId
Diffstat (limited to 'rust/src/bin')
-rw-r--r--rust/src/bin/fatcat-auth.rs8
-rw-r--r--rust/src/bin/fatcat-export.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/rust/src/bin/fatcat-auth.rs b/rust/src/bin/fatcat-auth.rs
index 7e2a7c39..9efd47ed 100644
--- a/rust/src/bin/fatcat-auth.rs
+++ b/rust/src/bin/fatcat-auth.rs
@@ -5,7 +5,7 @@ use clap::{App, SubCommand};
use fatcat::auth;
use fatcat::editing;
use fatcat::errors::*;
-use fatcat::identifiers::FatCatId;
+use fatcat::identifiers::FatcatId;
use fatcat::server::*;
use std::process;
use std::str::FromStr;
@@ -82,17 +82,17 @@ fn main() -> Result<()> {
subm.is_present("bot"),
)?;
//println!("{:?}", editor);
- println!("{}", FatCatId::from_uuid(&editor.id).to_string());
+ println!("{}", FatcatId::from_uuid(&editor.id).to_string());
}
("create-token", Some(subm)) => {
- let editor_id = FatCatId::from_str(subm.value_of("editor-id").unwrap())?;
+ let editor_id = FatcatId::from_str(subm.value_of("editor-id").unwrap())?;
println!("{}", confectionary.create_token(editor_id, None)?);
}
("inspect-token", Some(subm)) => {
confectionary.inspect_token(&db_conn, subm.value_of("token").unwrap())?;
}
("revoke-tokens", Some(subm)) => {
- let editor_id = FatCatId::from_str(subm.value_of("editor-id").unwrap())?;
+ let editor_id = FatcatId::from_str(subm.value_of("editor-id").unwrap())?;
fatcat::auth::revoke_tokens(&db_conn, editor_id)?;
println!("success!");
}
diff --git a/rust/src/bin/fatcat-export.rs b/rust/src/bin/fatcat-export.rs
index 157070e5..d438c00a 100644
--- a/rust/src/bin/fatcat-export.rs
+++ b/rust/src/bin/fatcat-export.rs
@@ -44,9 +44,9 @@ arg_enum! {
}
struct IdentRow {
- ident_id: FatCatId,
+ ident_id: FatcatId,
rev_id: Option<Uuid>,
- redirect_id: Option<FatCatId>,
+ redirect_id: Option<FatcatId>,
}
macro_rules! generic_loop_work {
@@ -116,14 +116,14 @@ fn parse_line(s: &str) -> Result<IdentRow> {
bail!("Invalid input line");
}
Ok(IdentRow {
- ident_id: FatCatId::from_uuid(&Uuid::from_str(&fields[0])?),
+ ident_id: FatcatId::from_uuid(&Uuid::from_str(&fields[0])?),
rev_id: match fields[1].as_ref() {
"" => None,
val => Some(Uuid::from_str(&val)?),
},
redirect_id: match fields[2].as_ref() {
"" => None,
- val => Some(FatCatId::from_uuid(&Uuid::from_str(&val)?)),
+ val => Some(FatcatId::from_uuid(&Uuid::from_str(&val)?)),
},
})
}