Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bradley Wood
rust-gitlab
Commits
84b26005
Commit
84b26005
authored
Jun 27, 2018
by
Brad King
Browse files
types: make project readme_url optional
Projects with no readme have no such url.
parent
f29c05b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/types.rs
View file @
84b26005
...
@@ -366,7 +366,7 @@ fn test_read_project() {
...
@@ -366,7 +366,7 @@ fn test_read_project() {
assert_eq!
(
project
.web_url
,
assert_eq!
(
project
.web_url
,
"https://gitlab.kitware.com/utils/rust-gitlab"
);
"https://gitlab.kitware.com/utils/rust-gitlab"
);
assert_eq!
(
project
.readme_url
,
assert_eq!
(
project
.readme_url
,
"https://gitlab.kitware.com/utils/rust-gitlab/blob/master/README.md"
);
Some
(
"https://gitlab.kitware.com/utils/rust-gitlab/blob/master/README.md"
.to_string
())
);
assert
!
(
project
.owner
.is_none
());
assert
!
(
project
.owner
.is_none
());
assert_eq!
(
project
.name
,
"rust-gitlab"
);
assert_eq!
(
project
.name
,
"rust-gitlab"
);
assert_eq!
(
project
.name_with_namespace
,
"Utils / rust-gitlab"
);
assert_eq!
(
project
.name_with_namespace
,
"Utils / rust-gitlab"
);
...
...
src/types.rs
View file @
84b26005
...
@@ -530,7 +530,7 @@ pub struct Project {
...
@@ -530,7 +530,7 @@ pub struct Project {
/// The URL for the project's homepage.
/// The URL for the project's homepage.
pub
web_url
:
String
,
pub
web_url
:
String
,
/// The URL for the project's readme.
/// The URL for the project's readme.
pub
readme_url
:
String
,
pub
readme_url
:
Option
<
String
>
,
/// The owner of the project (`None` for a group-owned project).
/// The owner of the project (`None` for a group-owned project).
pub
owner
:
Option
<
UserBasic
>
,
pub
owner
:
Option
<
UserBasic
>
,
/// The display name of the project.
/// The display name of the project.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment