Commit a55874a2 authored by Miha Čančula's avatar Miha Čančula
Browse files

Use intermediate variable to prevent long lines

parent fef98efe
......@@ -1301,8 +1301,9 @@ impl Gitlab {
req.header("PRIVATE-TOKEN", token_header_value)
},
Token::OAuth2(token) => {
let value = format!("Bearer {}", token);
let mut token_header_value =
HeaderValue::from_str(&format!("Bearer {}", token)).map_err(|_| ErrorKind::HeaderValueParse)?;
HeaderValue::from_str(&value).map_err(|_| ErrorKind::HeaderValueParse)?;
token_header_value.set_sensitive(true);
req.header("Authorization", token_header_value)
},
......
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