Make StackResources::new() const

This commit is contained in:
Dániel Buga 2023-06-28 15:03:57 +02:00 committed by GitHub
parent 9b5d7ec061
commit 59f829c6cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ pub struct StackResources<const SOCK: usize> {
impl<const SOCK: usize> StackResources<SOCK> {
/// Create a new set of stack resources.
pub fn new() -> Self {
pub const fn new() -> Self {
#[cfg(feature = "dns")]
const INIT: Option<dns::DnsQuery> = None;
Self {