-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Allow to expect (adopted) #15301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to expect (adopted) #15301
Changes from 28 commits
4aa4081
3d48e7a
58b379a
5a94b2e
c0830cb
1b0e8e0
648ff55
4981d93
66f72a7
4a9db7d
5bfe4b7
37cacc4
cac6cbf
486781c
c50791f
dce395d
8f8756c
80202ee
1cfe910
1631b97
73868a4
5ce7428
2a296a8
462f8ad
e2ca452
98e02f8
18f523a
ae87e76
31918d5
622c015
cdcaf84
ff5ecf9
dd95b7b
762b9d9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ use std::{ | |
use thiserror::Error; | ||
|
||
// Needed for doc strings | ||
#[allow(unused_imports)] | ||
#[allow(unused_imports, reason = "Needed for documentation links.")] | ||
use crate::io::{AssetReader, AssetWriter}; | ||
bas-ie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/// A "background" asset processor that reads asset values from a source [`AssetSource`] (which corresponds to an [`AssetReader`] / [`AssetWriter`] pair), | ||
|
@@ -557,7 +557,13 @@ impl AssetProcessor { | |
/// This info will later be used to determine whether or not to re-process an asset | ||
/// | ||
/// This will validate transactions and recover failed transactions when necessary. | ||
#[allow(unused)] | ||
#[cfg_attr( | ||
any(target_arch = "wasm32", not(feature = "multi_threaded")), | ||
expect( | ||
dead_code, | ||
reason = "This function is only used when the `multi_threaded` feature is enabled, and when not on WASM." | ||
) | ||
)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense to instead make intialize() feature-gated? |
||
async fn initialize(&self) -> Result<(), InitializeError> { | ||
self.validate_transaction_log_and_recover().await; | ||
let mut asset_infos = self.data.asset_infos.write().await; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,10 @@ use {bevy_ecs::system::Resource, bevy_utils::synccell::SyncCell}; | |
/// Wrapper resource for `tracing-chrome`'s flush guard. | ||
/// When the guard is dropped the chrome log is written to file. | ||
#[cfg(feature = "tracing-chrome")] | ||
#[allow(dead_code)] | ||
#[expect( | ||
dead_code, | ||
reason = "`FlushGuard` never needs to be read, it just needs to be kept alive for the `App`'s lifetime." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is so much more useful, wow. |
||
)] | ||
#[derive(Resource)] | ||
pub(crate) struct FlushGuard(SyncCell<tracing_chrome::FlushGuard>); | ||
|
||
|
@@ -187,7 +190,6 @@ impl Default for LogPlugin { | |
} | ||
|
||
impl Plugin for LogPlugin { | ||
#[cfg_attr(not(feature = "tracing-chrome"), allow(unused_variables))] | ||
fn build(&self, app: &mut App) { | ||
#[cfg(feature = "trace")] | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,7 @@ | |
clippy::undocumented_unsafe_blocks, | ||
clippy::ptr_cast_constness | ||
)] | ||
// FIXME(3492): remove once docs are ready | ||
#![allow(missing_docs)] | ||
#![expect(missing_docs, reason = "Not all docs are written yet, see #3492.")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mega-pedantic so feel free to ignore:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I take your point, but given it doesn't interfere with comprehension in this case I'll turn a blind eye to grammar 🙂 |
||
#![cfg_attr(docsrs, feature(doc_auto_cfg))] | ||
#![doc( | ||
html_logo_url = "https://bevyengine.org/assets/icon.png", | ||
|
Uh oh!
There was an error while loading. Please reload this page.