Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rust_icu_common/tests/hygiene.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![no_implicit_prelude]

#[allow(dead_code)]
struct Type {
rep: ::std::ptr::NonNull<::rust_icu_sys::UMessageFormat>,
}
Expand Down
4 changes: 2 additions & 2 deletions rust_icu_ucnv/src/utf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ impl Converter {
self.converter.reset_to_uchars();
self.utf8.reset_from_uchars();
self.pivot_to_source = self.pivot_to.start;
self.pivot_to_target = self.pivot_to_target;
self.pivot_to_target = self.pivot_to.start;
}

pub fn reset_from_utf8(&mut self) {
self.utf8.reset_to_uchars();
self.converter.reset_from_uchars();
self.pivot_from_source = self.pivot_from.start;
self.pivot_from_target = self.pivot_from_target;
self.pivot_from_target = self.pivot_from.start;
}

pub fn feed_to_utf8(&mut self, dst: &mut [u8], src: &[u8]) -> FeedResult {
Expand Down
4 changes: 2 additions & 2 deletions rust_icu_ucsdet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl<'detector> CharsetDetector<'detector> {
}

/// Return the charset that best matches the supplied input data.
pub fn detect(&self) -> Result<CharsetMatch, common::Error> {
pub fn detect(&self) -> Result<CharsetMatch<'_>, common::Error> {
let mut status = sys::UErrorCode::U_ZERO_ERROR;
let charset_match =
unsafe { versioned_function!(ucsdet_detect)(self.rep.as_ptr(), &mut status) };
Expand All @@ -128,7 +128,7 @@ impl<'detector> CharsetDetector<'detector> {
/// The results are ordered with the best quality match first.
///
/// Returns `&[CharsetMatch]` if no error.
pub fn detect_all(&self) -> Result<&[CharsetMatch], common::Error> {
pub fn detect_all(&self) -> Result<&[CharsetMatch<'_>], common::Error> {
let mut status = sys::UErrorCode::U_ZERO_ERROR;
let mut len = 0;
let charset_match = unsafe {
Expand Down
3 changes: 3 additions & 0 deletions rust_icu_udata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ use {
#[derive(Debug)]
enum Rep {
/// The data memory is backed by a user-supplied buffer.
/// The Vec<u8> is never read; it exists solely to keep the buffer alive
/// while ICU holds a raw pointer to it via udata_setCommonData.
#[allow(dead_code)]
Buffer(Vec<u8>),
/// The data memory is backed by a resource file.
Resource(
Expand Down
Loading