mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-24 20:26:25 +01:00
fix(api): minor fixes
* Mime crate must be used in the same version hyper uses * made attempted move a borrow
This commit is contained in:
@@ -25,7 +25,8 @@ name = "${util.program_name()}"
|
||||
|
||||
[dependencies]
|
||||
hyper = ">= 0.5.2"
|
||||
mime = "*"
|
||||
## Must match the one hyper uses, otherwise there are duplicate similarly named `Mime` structs
|
||||
mime = "0.0.11"
|
||||
serde = ">= 0.4.1"
|
||||
yup-oauth2 = "*"
|
||||
% for dep in cargo.get('dependencies', list()):
|
||||
|
||||
@@ -595,8 +595,8 @@ impl Header for RangeResponseHeader {
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Self> {
|
||||
if raw.len() > 0 {
|
||||
let v = raw[0];
|
||||
if let Ok(s) = std::str::from_utf8(&v) {
|
||||
let v = &raw[0];
|
||||
if let Ok(s) = std::str::from_utf8(v) {
|
||||
const PREFIX: &'static str = "bytes ";
|
||||
if s.starts_with(PREFIX) {
|
||||
if let Ok(c) = <Chunk as FromStr>::from_str(&s[PREFIX.len()..]) {
|
||||
|
||||
Reference in New Issue
Block a user