diff --git a/color.rs b/color.rs index a515e7c..adc1ba2 100644 --- a/color.rs +++ b/color.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use std::float::round; use std::libc::types::os::arch::c95::c_double; use std::cmp::Eq; @@ -46,9 +45,9 @@ pub fn hsla(h : float, s : float, l : float, a : float) -> Color { } } - let r = round(255.0*hue_to_rgb(m1, m2, h + 1.0/3.0) as c_double);; - let g = round(255.0*hue_to_rgb(m1, m2, h) as c_double); - let b = round(255.0*hue_to_rgb(m1, m2, h - 1.0/3.0) as c_double); + let r = (255.0*hue_to_rgb(m1, m2, h + 1.0/3.0) as c_double).round(); + let g = (255.0*hue_to_rgb(m1, m2, h) as c_double).round(); + let b = (255.0*hue_to_rgb(m1, m2, h - 1.0/3.0) as c_double).round(); return rgba(r as u8, g as u8, b as u8, a); } @@ -106,7 +105,7 @@ pub mod parsing { // split up r, g, and b let mut cols = ~[]; - for only_colors.split_iter(',').advance |s| { + for s in only_colors.split_iter(',') { cols.push(s); }; @@ -126,7 +125,7 @@ pub mod parsing { // split up r, g, and b let mut cols = ~[]; - for only_vals.split_iter(',').advance |s| { + for s in only_vals.split_iter(',') { cols.push(s); }; @@ -146,7 +145,7 @@ pub mod parsing { // split up h, s, and l let mut vals = ~[]; - for only_vals.split_iter(',').advance |s| { + for s in only_vals.split_iter(',') { vals.push(s); }; @@ -165,7 +164,7 @@ pub mod parsing { let only_vals = color.slice(5u, color.len() - 1); let mut vals = ~[]; - for only_vals.split_iter(',').advance |s| { + for s in only_vals.split_iter(',') { vals.push(s); }; diff --git a/parser.rs b/parser.rs index f8afd2c..38bde6a 100644 --- a/parser.rs +++ b/parser.rs @@ -14,7 +14,7 @@ use netsurfcss::stylesheet::{CssStylesheet, CssStylesheetParams, CssStylesheetPa use netsurfcss::types::CssLevel21; use netsurfcss::CssResult; use wapcaplet::LwcString; -use extra::net::url::Url; +use extra::url::Url; use netsurfcss::stylesheet::CssUrlResolutionFn; fn default_params(url: Url) -> CssStylesheetParams { diff --git a/select.rs b/select.rs index 19097fc..0ced8a6 100644 --- a/select.rs +++ b/select.rs @@ -131,9 +131,9 @@ impl> n::s::CssSelectHandler for SelectHandlerWrapper< do node_classes_opt.map |s| { debug!("SelectHandlerWrapper::node_classes - classes: %?", *s); let mut v = ~[]; - for s.split_iter(' ').advance |s| { - debug!("SelectHandlerWrapper::node_classes - class: %?", s); - if s != "" { v.push(lwcstr_from_rust_str(s)) } + for t in s.split_iter(' ') { + debug!("SelectHandlerWrapper::node_classes - class: %?", t); + if t != "" { v.push(lwcstr_from_rust_str(t)) } } debug!("SelectHandlerWrapper::classes: %?", v); v diff --git a/stylesheet.rs b/stylesheet.rs index 8aa2abf..e63593e 100644 --- a/stylesheet.rs +++ b/stylesheet.rs @@ -6,7 +6,7 @@ CSS stylesheets, owned types, immutable after creation */ -use extra::net::url::Url; +use extra::url::Url; use util::DataStream; use netsurfcss::stylesheet::CssStylesheet; use parser::{parse_stylesheet, parse_style_attribute}; diff --git a/values.rs b/values.rs index 4a89af9..50e3e15 100644 --- a/values.rs +++ b/values.rs @@ -16,7 +16,7 @@ At least it's consistent though. */ use std::cmp::Eq; -use extra::net::url::Url; +use extra::url::Url; use units::{Length, AbsoluteSize, RelativeSize}; use units::GenericFontFamily; use color::Color;