<commit_before>// Copyright © 2015, <NAME>
// Licensed under the MIT License <LICENSE.md>
//! A simple interface to the Google URL Shortener API.
extern crate hyper;
extern crate rustc_serialize;
extern crate url;

use hyper::{HttpError};
use hyper::client::{Request};
use hyper::header::{ContentType};
use hyper::method::{Method};
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper::status::{StatusCode};
use rustc_serialize::json::{BuilderError, Json};
use std::borrow::{ToOwned};
use std::io::{Read, Write};
use std::io::Error as IoError;
use url::{Url};
use url::ParseError as UrlError;
use url::form_urlencoded::{serialize};

const BASEURL: &'static str = "https://www.googleapis.com/urlshortener/v1/url";

/// Contains all possible errors you might get while shortening a URL
#[derive(Debug)]
pub enum Error {
    BadStatus(StatusCode, String),
    Http(HttpError),
    Io(IoError),
    Json(BuilderError),
    MissingId(Json),
    Url(UrlError),
}
impl From<HttpError> for Error {
    fn from(err: HttpError) -> Error {
        Error::Http(err)
    }
}
impl From<IoError> for Error {<commit_msg>Update hyper<commit_after>// Copyright © 2015, <NAME>
// Licensed under the MIT License <LICENSE.md>
//! A simple interface to the Google URL Shortener API.
extern crate hyper;
extern crate rustc_serialize;
extern crate url;

use hyper::Error as HttpError;
use hyper::client::{Request};
use hyper::header::{ContentType};
use hyper::method::{Method};
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper::status::{StatusCode};
use rustc_serialize::json::{BuilderError, Json};
use std::borrow::{ToOwned};
use std::io::{Read, Write};
use std::io::Error as IoError;
use url::{Url};
use url::ParseError as UrlError;
use url::form_urlencoded::{serialize};

const BASEURL: &'static str = "https://www.googleapis.com/urlshortener/v1/url";

/// Contains all possible errors you might get while shortening a URL
#[derive(Debug)]
pub enum Error {
    BadStatus(StatusCode, String),
    Http(HttpError),
    Io(IoError),
    Json(BuilderError),
    MissingId(Json),
    Url(UrlError),
}
impl From<HttpError> for Error {
    fn from(err: HttpError) -> Error {
        Error::Http(err)
    }
}
impl From<IoError> for Error {
{'fraction_non_alphanumeric': 0.15058611361587015, 'fraction_numerical': 0.004508566275924256, 'mean_word_length': 5.23314606741573, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4954113', 'n_tokens_mistral': 704, 'n_tokens_neox': 706, 'n_words': 209}