chore: Fix warnings for Rust 1.89 (#32378)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
4ff41ba62e
commit
72bcb0beb7
32 changed files with 102 additions and 95 deletions
|
@ -64,7 +64,7 @@ pub struct AppCell {
|
|||
impl AppCell {
|
||||
#[doc(hidden)]
|
||||
#[track_caller]
|
||||
pub fn borrow(&self) -> AppRef {
|
||||
pub fn borrow(&self) -> AppRef<'_> {
|
||||
if option_env!("TRACK_THREAD_BORROWS").is_some() {
|
||||
let thread_id = std::thread::current().id();
|
||||
eprintln!("borrowed {thread_id:?}");
|
||||
|
@ -74,7 +74,7 @@ impl AppCell {
|
|||
|
||||
#[doc(hidden)]
|
||||
#[track_caller]
|
||||
pub fn borrow_mut(&self) -> AppRefMut {
|
||||
pub fn borrow_mut(&self) -> AppRefMut<'_> {
|
||||
if option_env!("TRACK_THREAD_BORROWS").is_some() {
|
||||
let thread_id = std::thread::current().id();
|
||||
eprintln!("borrowed {thread_id:?}");
|
||||
|
@ -84,7 +84,7 @@ impl AppCell {
|
|||
|
||||
#[doc(hidden)]
|
||||
#[track_caller]
|
||||
pub fn try_borrow_mut(&self) -> Result<AppRefMut, BorrowMutError> {
|
||||
pub fn try_borrow_mut(&self) -> Result<AppRefMut<'_>, BorrowMutError> {
|
||||
if option_env!("TRACK_THREAD_BORROWS").is_some() {
|
||||
let thread_id = std::thread::current().id();
|
||||
eprintln!("borrowed {thread_id:?}");
|
||||
|
|
|
@ -718,7 +718,7 @@ impl<T> ops::Index<usize> for AtlasTextureList<T> {
|
|||
|
||||
impl<T> AtlasTextureList<T> {
|
||||
#[allow(unused)]
|
||||
fn drain(&mut self) -> std::vec::Drain<Option<T>> {
|
||||
fn drain(&mut self) -> std::vec::Drain<'_, Option<T>> {
|
||||
self.free_list.clear();
|
||||
self.textures.drain(..)
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ pub(crate) const ESCAPE_KEY: u16 = 0x1b;
|
|||
const TAB_KEY: u16 = 0x09;
|
||||
const SHIFT_TAB_KEY: u16 = 0x19;
|
||||
|
||||
pub fn key_to_native(key: &str) -> Cow<str> {
|
||||
pub fn key_to_native(key: &str) -> Cow<'_, str> {
|
||||
use cocoa::appkit::*;
|
||||
let code = match key {
|
||||
"space" => SPACE_KEY,
|
||||
|
|
|
@ -149,7 +149,7 @@ impl Scene {
|
|||
),
|
||||
allow(dead_code)
|
||||
)]
|
||||
pub(crate) fn batches(&self) -> impl Iterator<Item = PrimitiveBatch> {
|
||||
pub(crate) fn batches(&self) -> impl Iterator<Item = PrimitiveBatch<'_>> {
|
||||
BatchIterator {
|
||||
shadows: &self.shadows,
|
||||
shadows_start: 0,
|
||||
|
|
|
@ -616,7 +616,7 @@ impl Hash for (dyn AsCacheKeyRef + '_) {
|
|||
}
|
||||
|
||||
impl AsCacheKeyRef for CacheKey {
|
||||
fn as_cache_key_ref(&self) -> CacheKeyRef {
|
||||
fn as_cache_key_ref(&self) -> CacheKeyRef<'_> {
|
||||
CacheKeyRef {
|
||||
text: &self.text,
|
||||
font_size: self.font_size,
|
||||
|
@ -645,7 +645,7 @@ impl<'a> Borrow<dyn AsCacheKeyRef + 'a> for Arc<CacheKey> {
|
|||
}
|
||||
|
||||
impl AsCacheKeyRef for CacheKeyRef<'_> {
|
||||
fn as_cache_key_ref(&self) -> CacheKeyRef {
|
||||
fn as_cache_key_ref(&self) -> CacheKeyRef<'_> {
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue