Skip to content

Commit

Permalink
remove author not found from frozen cmd
Browse files Browse the repository at this point in the history
AureliaDolo committed Nov 15, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent cc60870 commit 418cffb
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
@@ -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())
}
}
Original file line number Diff line number Diff line change
@@ -18,9 +18,6 @@
},
{
"status": "author_not_allowed"
},
{
"status": "author_not_found"
}
]
}
Original file line number Diff line number Diff line change
@@ -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:
Original file line number Diff line number Diff line change
@@ -33,8 +33,3 @@ class RepAuthorNotAllowed(Rep):
def __init__(
self,
) -> None: ...

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

0 comments on commit 418cffb

Please sign in to comment.