Ok(y) => y,
Err(e) => {
return ClientError::InvalidJSONSyntax(url, e.to_string())
- },
+ }
};
let val_restring = serde_json::to_string(&val)
.unwrap_or_else(|e| format!("failed to regenerate json! {e}"));
&mut self,
id: &str,
) -> Result<Relationship, ClientError> {
- let req = Req::get("api/v1/accounts/relationships").param("id", id);
+ let req = Req::get("api/v1/accounts/relationships").param("id", id);
let (rels, url) = self.api_request_parse::<Vec<Relationship>>(req)?;
for rel in rels {
if rel.id == id {
reqwest::StatusCode::NOT_FOUND,
_,
)) => LogicalAction::Goto(
- OverlayActivity::BottomLineError(
- format!("User '{}' not found", s)
- )
+ OverlayActivity::BottomLineError(format!(
+ "User '{}' not found",
+ s
+ ))
.into(),
),
reqwest::StatusCode::NOT_FOUND,
_,
)) => LogicalAction::Goto(
- OverlayActivity::BottomLineError(
- format!("Post id {} not found", s)
- )
+ OverlayActivity::BottomLineError(format!(
+ "Post id {} not found",
+ s
+ ))
.into(),
),
pub mod types;
use crate::config::ConfigLocation;
-use crate::tui::Tui;
use crate::top_level_error::TopLevelError;
+use crate::tui::Tui;
#[derive(Parser, Debug)]
struct Args {
serde_json::from_str::<S>(j).unwrap_err();
};
- chk(r#"{ "a": 0 }"#, 0, "0");
- chk(r#"{ "a": 1 }"#, 1, "1");
+ chk(r#"{ "a": 0 }"#, 0, "0");
+ chk(r#"{ "a": 1 }"#, 1, "1");
chk(r#"{ "a": -1 }"#, -1, "unavailable");
chk_err(r#"{}"#);
chk_err(r#"{ "a": -42 }"#);