Skip to content

Commit 53802a6

Browse files
committed
Move to stable rust
1 parent fc7dbbd commit 53802a6

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "conduit-test"
4-
version = "0.7.1"
4+
version = "0.7.2"
55
authors = ["[email protected]",
66
"Alex Crichton <[email protected]>"]
77
description = "Testing utilities for conduit-based stacks"

src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(core)]
2-
31
extern crate semver;
42
extern crate conduit;
53

@@ -74,15 +72,15 @@ pub struct MockHeaders {
7472

7573
impl Headers for MockHeaders {
7674
fn find(&self, key: &str) -> Option<Vec<&str>> {
77-
self.headers.get(key).map(|v| vec!(v.as_slice()))
75+
self.headers.get(key).map(|v| vec![&v[..]])
7876
}
7977

8078
fn has(&self, key: &str) -> bool {
8179
self.headers.contains_key(key)
8280
}
8381

8482
fn all(&self) -> Vec<(&str, Vec<&str>)> {
85-
self.headers.iter().map(|(k,v)| (k.as_slice(), vec![v.as_slice()]))
83+
self.headers.iter().map(|(k,v)| (&k[..], vec![&v[..]]))
8684
.collect()
8785
}
8886
}
@@ -102,11 +100,11 @@ impl conduit::Request for MockRequest {
102100
fn virtual_root(&self) -> Option<&str> { None }
103101

104102
fn path(&self) -> &str {
105-
self.path.as_slice()
103+
&self.path
106104
}
107105

108106
fn query_string(&self) -> Option<&str> {
109-
self.query_string.as_ref().map(|s| s.as_slice())
107+
self.query_string.as_ref().map(|s| &s[..])
110108
}
111109

112110
fn remote_addr(&self) -> SocketAddr {

0 commit comments

Comments
 (0)