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

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 {