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

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 {