File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
branches/dist-snap/src/libglob Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: 1813e5aa1a03b0596b8de7abd1af31edf5d6098f
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 8a1aaac396cea58a9192cbcab3bb87522ceba907
9
+ refs/heads/dist-snap: 30dbcf5f88b20db3ea1c70bb50cb37fa9364f1a9
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -310,7 +310,7 @@ impl Pattern {
310
310
* brackets. The resulting string will, when compiled into a `Pattern`,
311
311
* match the input string and nothing else.
312
312
*/
313
- pub fn escape ( s : & str ) -> ~ str {
313
+ pub fn escape ( s : & str ) -> StrBuf {
314
314
let mut escaped = StrBuf :: new ( ) ;
315
315
for c in s. chars ( ) {
316
316
match c {
@@ -325,7 +325,7 @@ impl Pattern {
325
325
}
326
326
}
327
327
}
328
- escaped. into_owned ( )
328
+ escaped
329
329
}
330
330
331
331
/**
@@ -767,8 +767,8 @@ mod test {
767
767
#[ test]
768
768
fn test_pattern_escape ( ) {
769
769
let s = "_[_]_?_*_!_" ;
770
- assert_eq ! ( Pattern :: escape( s) , "_[[]_[]]_[?]_[*]_!_" . to_owned ( ) ) ;
771
- assert ! ( Pattern :: new( Pattern :: escape( s) ) . matches( s) ) ;
770
+ assert_eq ! ( Pattern :: escape( s) , "_[[]_[]]_[?]_[*]_!_" . to_strbuf ( ) ) ;
771
+ assert ! ( Pattern :: new( Pattern :: escape( s) . as_slice ( ) ) . matches( s) ) ;
772
772
}
773
773
774
774
#[ test]
You can’t perform that action at this time.
0 commit comments