mirror of
https://github.com/openharmony/third_party_rust_encoding_rs.git
synced 2026-07-01 21:14:01 -04:00
Run cargo fmt
This commit is contained in:
+5
-5
@@ -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
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user