Remove dependency on regex_macros

This reduces the amount of code using unstable features that we depend on.
The hand-written IP address parser is probably just as fast.
This commit is contained in:
Simon Sapin 2015-11-23 14:01:00 +01:00
parent 0dfdc94cb2
commit 45ec900745
9 changed files with 7 additions and 52 deletions

View file

@ -11,7 +11,6 @@
#![feature(vec_push_all)]
#![feature(custom_attribute)]
#![plugin(serde_macros, plugins)]
#![plugin(regex_macros)]
#[macro_use]
extern crate log;
@ -20,7 +19,6 @@ extern crate hyper;
extern crate ipc_channel;
extern crate image as piston_image;
extern crate msg;
extern crate regex;
extern crate serde;
extern crate stb_image;
extern crate url;
@ -33,7 +31,6 @@ use hyper::mime::{Attr, Mime};
use hyper::status::StatusCode;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use msg::constellation_msg::{PipelineId};
use regex::Regex;
use serde::{Deserializer, Serializer};
use std::thread;
use url::Url;
@ -44,10 +41,6 @@ pub mod image_cache_task;
pub mod net_error_list;
pub mod storage_task;
pub static IPV4_REGEX: Regex = regex!(
r"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$");
pub static IPV6_REGEX: Regex = regex!(r"^([a-fA-F0-9]{0,4}[:]?){1,8}$");
/// [Response type](https://fetch.spec.whatwg.org/#concept-response-type)
#[derive(Clone, PartialEq, Copy)]
pub enum ResponseType {