Merge pull request #1591 from bugadani/patch-1

Make StackResources::new() const
This commit is contained in:
Dario Nieuwenhuis 2023-06-28 13:16:27 +00:00 committed by GitHub
commit 2eb7a67c70
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> { impl<const SOCK: usize> StackResources<SOCK> {
/// Create a new set of stack resources. /// Create a new set of stack resources.
pub fn new() -> Self { pub const fn new() -> Self {
#[cfg(feature = "dns")] #[cfg(feature = "dns")]
const INIT: Option<dns::DnsQuery> = None; const INIT: Option<dns::DnsQuery> = None;
Self { Self {