Skip to content

Commit

Permalink
remove author not found from frozen cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
AureliaDolo committed Nov 15, 2024
1 parent b0b3183 commit a5dd0d3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 27 deletions.
2 changes: 1 addition & 1 deletion libparsec/crates/client/src/client/list_frozen_users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub async fn list_frozen_users(
match cmds.send(Req {}).await? {
Rep::Ok { frozen_users } => Ok(frozen_users),
Rep::AuthorNotAllowed => Err(ClientListFrozenUsersError::AuthorNotAllowed),
bad_rep @ (Rep::UnknownStatus { .. } | Rep::AuthorNotFound) => {
bad_rep @ Rep::UnknownStatus { .. } => {
Err(anyhow::anyhow!("Unexpected server response: {:?}", bad_rep).into())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
},
{
"status": "author_not_allowed"
},
{
"status": "author_not_found"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,6 @@ pub fn rep_author_not_allowed() {
p_assert_eq!(data2, expected);
}

pub fn rep_author_not_found() {
// Generated from Parsec 3.1.1-a.0+dev
// Content:
// status: 'author_not_found'
let raw: &[u8] = hex!("81a6737461747573b0617574686f725f6e6f745f666f756e64").as_ref();
let expected = authenticated_cmds::list_frozen_users::Rep::AuthorNotFound;
let data = authenticated_cmds::list_frozen_users::Rep::load(raw).unwrap();

p_assert_eq!(data, expected);

// Also test serialization round trip
let raw2 = data.dump().unwrap();

let data2 = authenticated_cmds::list_frozen_users::Rep::load(&raw2).unwrap();

p_assert_eq!(data2, expected);
}

pub fn rep_ok() {
// Generated from Parsec 3.1.1-a.0+dev
// Content:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,3 @@ class RepAuthorNotAllowed(Rep):
def __init__(
self,
) -> None: ...

class RepAuthorNotFound(Rep):
def __init__(
self,
) -> None: ...

0 comments on commit a5dd0d3

Please sign in to comment.