зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
# ignore-this-changeset Depends on D89392 Differential Revision: https://phabricator.services.mozilla.com/D89393
This commit is contained in:
Родитель
c320561565
Коммит
ba8d39bfb3
|
@ -473,7 +473,7 @@ impl SwCompositeJob {
|
|||
band_offset,
|
||||
band_height,
|
||||
);
|
||||
},
|
||||
}
|
||||
SwCompositeSource::YUV(ref y, ref u, ref v, color_space) => {
|
||||
let swgl_color_space = match color_space {
|
||||
YuvColorSpace::Rec601 => swgl::YUVColorSpace::Rec601,
|
||||
|
@ -498,7 +498,7 @@ impl SwCompositeJob {
|
|||
band_offset,
|
||||
band_height,
|
||||
);
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,10 +185,7 @@ pub unsafe extern "C" fn fluent_bundle_destroy(bundle: *mut FluentBundleRc) {
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fluent_bundle_has_message(
|
||||
bundle: &FluentBundleRc,
|
||||
id: &nsACString,
|
||||
) -> bool {
|
||||
pub extern "C" fn fluent_bundle_has_message(bundle: &FluentBundleRc, id: &nsACString) -> bool {
|
||||
bundle.has_message(id.to_string().as_str())
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::convert::TryInto;
|
||||
use nsstring::nsACString;
|
||||
use nsstring::nsCString;
|
||||
use std::convert::TryInto;
|
||||
use thin_vec::ThinVec;
|
||||
pub use unic_langid::{subtags, CharacterDirection, LanguageIdentifier, LanguageIdentifierError};
|
||||
|
||||
|
@ -71,10 +71,7 @@ pub unsafe extern "C" fn unic_langid_destroy(langid: *mut LanguageIdentifier) {
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn unic_langid_as_string(
|
||||
langid: &mut LanguageIdentifier,
|
||||
ret_val: &mut nsACString,
|
||||
) {
|
||||
pub extern "C" fn unic_langid_as_string(langid: &mut LanguageIdentifier, ret_val: &mut nsACString) {
|
||||
ret_val.assign(&langid.to_string());
|
||||
}
|
||||
|
||||
|
@ -104,12 +101,12 @@ pub extern "C" fn unic_langid_clear_language(langid: &mut LanguageIdentifier) {
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn unic_langid_get_script(
|
||||
langid: &LanguageIdentifier,
|
||||
len: &mut u32,
|
||||
) -> *const u8 {
|
||||
pub extern "C" fn unic_langid_get_script(langid: &LanguageIdentifier, len: &mut u32) -> *const u8 {
|
||||
let script: &str = helpers::get_script_str(langid);
|
||||
*len = script.len().try_into().expect("string should be at most 4 chars");
|
||||
*len = script
|
||||
.len()
|
||||
.try_into()
|
||||
.expect("string should be at most 4 chars");
|
||||
script.as_ptr()
|
||||
}
|
||||
|
||||
|
@ -129,12 +126,12 @@ pub extern "C" fn unic_langid_clear_script(langid: &mut LanguageIdentifier) {
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn unic_langid_get_region(
|
||||
langid: &LanguageIdentifier,
|
||||
len: &mut u32,
|
||||
) -> *const u8 {
|
||||
pub extern "C" fn unic_langid_get_region(langid: &LanguageIdentifier, len: &mut u32) -> *const u8 {
|
||||
let region: &str = helpers::get_region_str(langid);
|
||||
*len = region.len().try_into().expect("string should be at most 4 chars");
|
||||
*len = region
|
||||
.len()
|
||||
.try_into()
|
||||
.expect("string should be at most 4 chars");
|
||||
region.as_ptr()
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче