Run cargo fmt

This commit is contained in:
Henri Sivonen
2021-12-08 10:59:44 +02:00
parent 50b133fa90
commit 174eabd294
2 changed files with 16 additions and 16 deletions
+5 -5
View File
@@ -2697,18 +2697,18 @@ impl Encoding {
/// on it.)
///
/// Available via the C wrapper.
///
///
/// # Example
/// ```
/// use encoding_rs::Encoding;
///
///
/// assert_eq!(Some(encoding_rs::UTF_8), Encoding::for_label(b"utf-8"));
/// assert_eq!(Some(encoding_rs::UTF_8), Encoding::for_label(b"unicode11utf8"));
///
///
/// assert_eq!(Some(encoding_rs::ISO_8859_2), Encoding::for_label(b"latin2"));
///
///
/// assert_eq!(Some(encoding_rs::UTF_16BE), Encoding::for_label(b"utf-16be"));
///
///
/// assert_eq!(None, Encoding::for_label(b"unrecognized label"));
/// ```
pub fn for_label(label: &[u8]) -> Option<&'static Encoding> {
+11 -11
View File
@@ -20,17 +20,17 @@
//! allocation in Rust code, including the convenience methods on `Encoding`.
use super::*;
use crate::big5::*;
use crate::euc_jp::*;
use crate::euc_kr::*;
use crate::gb18030::*;
use crate::iso_2022_jp::*;
use crate::replacement::*;
use crate::shift_jis::*;
use crate::single_byte::*;
use crate::utf_16::*;
use crate::utf_8::*;
use crate::x_user_defined::*;
use big5::*;
use euc_jp::*;
use euc_kr::*;
use gb18030::*;
use iso_2022_jp::*;
use replacement::*;
use shift_jis::*;
use single_byte::*;
use utf_16::*;
use utf_8::*;
use x_user_defined::*;
pub enum VariantDecoder {
SingleByte(SingleByteDecoder),