Importing associated "static" struct functions

Ability to refer to "static" associated functions seems like win/win. This would makes code less verbose but not currently possible due to the following compiler error

use std::time::Duration::from_secs;

error[E0432]: unresolved import std::time::Duration --> ... | 9 | use std::time::Duration::from_secs; | ^^^^^^^^ Duration is a struct, not a module

Previous discussion: Allow importing assoicated methods

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.