summaryrefslogtreecommitdiff
path: root/rust/src/collaboration/group.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/collaboration/group.rs')
-rw-r--r--rust/src/collaboration/group.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/rust/src/collaboration/group.rs b/rust/src/collaboration/group.rs
index 08efa079..01f92169 100644
--- a/rust/src/collaboration/group.rs
+++ b/rust/src/collaboration/group.rs
@@ -49,7 +49,7 @@ impl RemoteGroup {
/// Set group name
/// You will need to push the group to update the Remote.
- pub fn set_name<U: IntoCStr>(&self, name: U) {
+ pub fn set_name(&self, name: &str) {
let name = name.to_cstr();
unsafe { BNCollaborationGroupSetName(self.handle.as_ptr(), name.as_ptr()) }
}
@@ -83,8 +83,7 @@ impl RemoteGroup {
/// You will need to push the group to update the Remote.
pub fn set_users<I>(&self, usernames: I) -> Result<(), ()>
where
- I: IntoIterator,
- I::Item: IntoCStr,
+ I: IntoIterator<Item = String>,
{
let usernames: Vec<_> = usernames.into_iter().map(|u| u.to_cstr()).collect();
let mut usernames_raw: Vec<_> = usernames.iter().map(|s| s.as_ptr()).collect();
@@ -102,7 +101,7 @@ impl RemoteGroup {
}
/// Test if a group has a user with the given username
- pub fn contains_user<U: IntoCStr>(&self, username: U) -> bool {
+ pub fn contains_user(&self, username: &str) -> bool {
let username = username.to_cstr();
unsafe { BNCollaborationGroupContainsUser(self.handle.as_ptr(), username.as_ptr()) }
}