Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicholas Bailey
rust-gitlab
Commits
589e5921
Commit
589e5921
authored
Oct 10, 2019
by
Ben Boeckel
⛰
Browse files
cargo: update to percent-encoding 2.0
parent
36ce2958
Changes
2
Hide whitespace changes
Inline
Side-by-side
Cargo.toml
View file @
589e5921
...
...
@@ -15,7 +15,7 @@ categories = ["web-programming", "api-bindings"]
[dependencies]
itertools
=
"~0.8"
log
=
"~0.4"
percent-encoding
=
"^
1
.0"
percent-encoding
=
"^
2
.0"
reqwest
=
"~0.9"
chrono
=
{
version
=
"~0.4"
,
features
=
["serde"]
}
...
...
src/gitlab.rs
View file @
589e5921
...
...
@@ -5,7 +5,7 @@
// except according to those terms.
use
crates
::
itertools
::
Itertools
;
use
crates
::
percent_encoding
::{
utf8_percent_encode
,
PercentEncode
,
PATH_SEGMENT_ENCODE_SET
};
use
crates
::
percent_encoding
::{
utf8_percent_encode
,
AsciiSet
,
PercentEncode
,
CONTROLS
};
use
crates
::
reqwest
::
header
::
HeaderValue
;
use
crates
::
reqwest
::{
Client
,
RequestBuilder
,
Url
};
use
crates
::
serde
::
de
::
Error
as
SerdeError
;
...
...
@@ -20,6 +20,19 @@ use types::*;
use
std
::
borrow
::
Borrow
;
use
std
::
fmt
::{
self
,
Debug
,
Display
};
const
PATH_SEGMENT_ENCODE_SET
:
&
AsciiSet
=
&
CONTROLS
.add
(
b' '
)
.add
(
b'"'
)
.add
(
b'#'
)
.add
(
b'<'
)
.add
(
b'>'
)
.add
(
b'`'
)
.add
(
b'?'
)
.add
(
b'{'
)
.add
(
b'}'
)
.add
(
b'%'
)
.add
(
b'/'
);
/// A Gitlab API token
///
/// Gitlab supports two kinds of tokens
...
...
@@ -249,7 +262,7 @@ impl Gitlab {
}
/// A URL-safe name for projects.
fn
url_name
(
name
:
&
str
)
->
PercentEncode
<
PATH_SEGMENT_ENCODE_SET
>
{
fn
url_name
(
name
:
&
str
)
->
PercentEncode
{
utf8_percent_encode
(
name
,
PATH_SEGMENT_ENCODE_SET
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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