diff options
-rw-r--r-- | net/src/async.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/encrypt-for.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/notarize.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/sign-detached.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/sign.rs | 2 | ||||
-rw-r--r-- | openpgp/examples/wrap-literal.rs | 2 | ||||
-rw-r--r-- | openpgp/src/armor.rs | 10 | ||||
-rw-r--r-- | openpgp/src/packet/mod.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/mod.rs | 4 | ||||
-rw-r--r-- | tool/src/sq.rs | 10 |
10 files changed, 19 insertions, 19 deletions
diff --git a/net/src/async.rs b/net/src/async.rs index b3a5f7a3..9cd298b6 100644 --- a/net/src/async.rs +++ b/net/src/async.rs @@ -156,7 +156,7 @@ impl KeyServer { let mut armored_blob = vec![]; { let mut w = match Writer::new(&mut armored_blob, - Kind::PublicKey, &[][..]) { + Kind::PublicKey, &[]) { Err(e) => return Box::new(future::err(e.into())), Ok(w) => w, }; diff --git a/openpgp/examples/encrypt-for.rs b/openpgp/examples/encrypt-for.rs index bc70e307..be2f1cc5 100644 --- a/openpgp/examples/encrypt-for.rs +++ b/openpgp/examples/encrypt-for.rs @@ -42,7 +42,7 @@ fn main() { // Compose a writer stack corresponding to the output format and // packet structure we want. First, we want the output to be // ASCII armored. - let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[][..]) + let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[]) .expect("Failed to create an armored writer"); // Stream an OpenPGP message. diff --git a/openpgp/examples/notarize.rs b/openpgp/examples/notarize.rs index 6643e573..126eb657 100644 --- a/openpgp/examples/notarize.rs +++ b/openpgp/examples/notarize.rs @@ -35,7 +35,7 @@ fn main() { // Compose a writer stack corresponding to the output format and // packet structure we want. First, we want the output to be // ASCII armored. - let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[][..]) + let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[]) .expect("Failed to create an armored writer."); // Stream an OpenPGP message. diff --git a/openpgp/examples/sign-detached.rs b/openpgp/examples/sign-detached.rs index bc071ba6..a9764db8 100644 --- a/openpgp/examples/sign-detached.rs +++ b/openpgp/examples/sign-detached.rs @@ -28,7 +28,7 @@ fn main() { // Compose a writer stack corresponding to the output format and // packet structure we want. First, we want the output to be // ASCII armored. - let sink = armor::Writer::new(io::stdout(), armor::Kind::Signature, &[][..]) + let sink = armor::Writer::new(io::stdout(), armor::Kind::Signature, &[]) .expect("Failed to create armored writer."); // Stream an OpenPGP message. diff --git a/openpgp/examples/sign.rs b/openpgp/examples/sign.rs index 6b05a08c..53bc158c 100644 --- a/openpgp/examples/sign.rs +++ b/openpgp/examples/sign.rs @@ -29,7 +29,7 @@ fn main() { // Compose a writer stack corresponding to the output format and // packet structure we want. First, we want the output to be // ASCII armored. - let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[][..]) + let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[]) .expect("Failed to create an armored writer."); // Stream an OpenPGP message. diff --git a/openpgp/examples/wrap-literal.rs b/openpgp/examples/wrap-literal.rs index 9d9560e3..335bf307 100644 --- a/openpgp/examples/wrap-literal.rs +++ b/openpgp/examples/wrap-literal.rs @@ -21,7 +21,7 @@ fn main() { // Compose a writer stack corresponding to the output format and // packet structure we want. First, we want the output to be // ASCII armored. - let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[][..]) + let sink = armor::Writer::new(io::stdout(), armor::Kind::Message, &[]) .expect("Failed to create armored writer."); // Stream an OpenPGP message. diff --git a/openpgp/src/armor.rs b/openpgp/src/armor.rs index b0d0cae4..f7cf5852 100644 --- a/openpgp/src/armor.rs +++ b/openpgp/src/armor.rs @@ -1056,7 +1056,7 @@ mod test { let mut buf = Vec::new(); { - let mut w = Writer::new(&mut buf, Kind::File, &[][..]).unwrap(); + let mut w = Writer::new(&mut buf, Kind::File, &[]).unwrap(); w.write(&[]).unwrap(); // Avoid zero-length optimization. w.write_all(&bin).unwrap(); } @@ -1078,7 +1078,7 @@ mod test { let mut buf = Vec::new(); { - let mut w = Writer::new(&mut buf, Kind::File, &[][..]).unwrap(); + let mut w = Writer::new(&mut buf, Kind::File, &[]).unwrap(); w.write(&[]).unwrap(); // Avoid zero-length optimization. for (i, _) in bin.iter().enumerate() { w.write(&bin[i..i+1]).unwrap(); @@ -1095,7 +1095,7 @@ mod test { // unused. let mut buf = Vec::new(); { - drop(Writer::new(&mut buf, Kind::File, &[][..]).unwrap()); + drop(Writer::new(&mut buf, Kind::File, &[]).unwrap()); } assert!(buf.is_empty()); @@ -1103,7 +1103,7 @@ mod test { // string. let mut buf = Vec::new(); { - let mut w = Writer::new(&mut buf, Kind::File, &[][..]).unwrap(); + let mut w = Writer::new(&mut buf, Kind::File, &[]).unwrap(); w.write(&[]).unwrap(); } assert_eq!( @@ -1306,7 +1306,7 @@ mod test { } let mut encoded = Vec::new(); - Writer::new(&mut encoded, kind, &[][..]).unwrap() + Writer::new(&mut encoded, kind, &[]).unwrap() .write_all(&payload) .unwrap(); diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs index 2347b43c..d81eb532 100644 --- a/openpgp/src/packet/mod.rs +++ b/openpgp/src/packet/mod.rs @@ -318,7 +318,7 @@ impl Common { children: if let Some(ref container) = self.children { container.packets.iter() } else { - let empty_packet_slice : &[Packet] = &[][..]; + let empty_packet_slice : &[Packet] = &[]; empty_packet_slice.iter() }, child: None, diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index 6de7f3da..21aa4546 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -148,7 +148,7 @@ fn sign_data(input: &mut io::Read, output_path: Option<&str>, } else { armor::Kind::Message }, - &[][..])?) + &[])?) } else { output }; @@ -202,7 +202,7 @@ fn sign_message(input: &mut io::Read, output_path: Option<&str>, let output = if ! binary { Box::new(armor::Writer::new(&mut output, armor::Kind::Message, - &[][..])?) + &[])?) } else { output }; diff --git a/tool/src/sq.rs b/tool/src/sq.rs index 7a045ca2..05285d9c 100644 --- a/tool/src/sq.rs +++ b/tool/src/sq.rs @@ -123,7 +123,7 @@ fn real_main() -> Result<(), failure::Error> { let mut output = if ! m.is_present("binary") { Box::new(armor::Writer::new(&mut output, armor::Kind::Message, - &[][..])?) + &[])?) } else { output }; @@ -178,7 +178,7 @@ fn real_main() -> Result<(), failure::Error> { let mut input = open_or_stdin(m.value_of("input"))?; let mut output = create_or_stdout(m.value_of("output"))?; let mut filter = armor::Writer::new(&mut output, armor::Kind::File, - &[][..])?; + &[])?; io::copy(&mut input, &mut filter)?; }, ("dearmor", Some(m)) => { @@ -196,7 +196,7 @@ fn real_main() -> Result<(), failure::Error> { for h in &ac.headers { if let Some(ref tpk) = h.key { let mut filter = armor::Writer::new( - &mut output, armor::Kind::PublicKey, &[][..])?; + &mut output, armor::Kind::PublicKey, &[])?; tpk.serialize(&mut filter)?; } } @@ -257,7 +257,7 @@ fn real_main() -> Result<(), failure::Error> { let mut output = if ! m.is_present("binary") { Box::new(armor::Writer::new(&mut output, armor::Kind::PublicKey, - &[][..])?) + &[])?) } else { output }; @@ -312,7 +312,7 @@ fn real_main() -> Result<(), failure::Error> { let mut output = if ! m.is_present("binary") { Box::new(armor::Writer::new(&mut output, armor::Kind::PublicKey, - &[][..])?) + &[])?) } else { output }; |