Skip to content

Commit 6f53ec1

Browse files
bors[bot]cuviper
andcommitted
637: #[allow(deprecated)] impl Default for Configuration r=cuviper a=cuviper Using `#[derive(Default)]` started triggering `Configuration`'s own deprecation message on nightly, as it has been on our compat 1.13 as well (though stable has been fine). We can easily `#[allow(deprecated)]` on a manual `impl` to avoid this. Co-authored-by: Josh Stone <[email protected]>
2 parents abd942e + a0be729 commit 6f53ec1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

rayon-core/src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ pub struct ThreadPoolBuilder {
155155
///
156156
/// [`ThreadPoolBuilder`]: struct.ThreadPoolBuilder.html
157157
#[deprecated(note = "Use `ThreadPoolBuilder`")]
158-
#[derive(Default)]
159158
pub struct Configuration {
160159
builder: ThreadPoolBuilder,
161160
}
@@ -539,6 +538,15 @@ impl fmt::Debug for ThreadPoolBuilder {
539538
}
540539
}
541540

541+
#[allow(deprecated)]
542+
impl Default for Configuration {
543+
fn default() -> Self {
544+
Configuration {
545+
builder: Default::default(),
546+
}
547+
}
548+
}
549+
542550
#[allow(deprecated)]
543551
impl fmt::Debug for Configuration {
544552
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

0 commit comments

Comments
 (0)