Commit 588218b9 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

gitlab: don't use Option<T>

Gitlab returns a 404 for users which are not members of a project which
is not distinguishable from the project not existing or any other error.
parent b9c52d23
......@@ -140,7 +140,7 @@ impl Gitlab {
}
/// Get a team member of a group.
pub fn group_member(&self, group: GroupId, user: UserId) -> GitlabResult<Option<Member>> {
pub fn group_member(&self, group: GroupId, user: UserId) -> GitlabResult<Member> {
self._get(&format!("groups/{}/members/{}", group, user))
}
......@@ -150,7 +150,7 @@ impl Gitlab {
}
/// Get a team member of a project.
pub fn project_member(&self, project: ProjectId, user: UserId) -> GitlabResult<Option<Member>> {
pub fn project_member(&self, project: ProjectId, user: UserId) -> GitlabResult<Member> {
self._get(&format!("projects/{}/members/{}", project, user))
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment