Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Commit 04556be

Browse files
committed
fix argument short being already in use
1 parent 208878d commit 04556be

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/db.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,17 @@ impl DB {
7070
Ok(result) => {
7171
match result {
7272
Some(doc) => {
73-
let id = doc.get_object_id("_id").ok()?.to_string();
73+
let rawid = doc.get("_id").ok_or("unexpected id type").unwrap().to_string();
74+
let tmpuuid = Uuid::parse_str(&rawid);
75+
let id: String;
76+
match tmpuuid {
77+
Ok(myuuid) => {
78+
id = myuuid.to_string();
79+
},
80+
Err(_) => {
81+
id = doc.get_object_id("_id").ok()?.to_string();
82+
}
83+
};
7484
log::info!("{}.{}: Found newest doc with id: {}", db, collection, &id);
7585
Some(id)
7686
},

src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ async fn main() -> BoxResult<()> {
7070
)
7171
.arg(
7272
Arg::with_name("continue")
73-
.short("c")
7473
.long("continue")
7574
.required(false)
7675
.value_name("STREAM_CONTINUE")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy