Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazy_static static shadowing struct #39926

Closed
bjorn3 opened this issue Feb 18, 2017 · 2 comments
Closed

lazy_static static shadowing struct #39926

bjorn3 opened this issue Feb 18, 2017 · 2 comments

Comments

@bjorn3
Copy link
Member

bjorn3 commented Feb 18, 2017

In bjorn3/goodgame_empire_import I have a lazy_static with the same name as its type except for the case. (data::DATAMGR and data::DataMgr)
The static overwrites the page of the struct:

lazy_static!{
    pub static ref DATAMGR: Mutex<DataMgr> = {
        Mutex::new(DataMgr::new())
    };
}

/// Data manager
#[derive(Debug, Serialize)]
pub struct DataMgr {
    /// List of castles
    pub castles: HashMap<u64, Castle>,
    pub users: HashMap<u64, User>,
}
@sinkuu
Copy link
Contributor

sinkuu commented Feb 18, 2017

Do you mean generated rustdoc is corrupted?
If so, this is a duplication of #25879.

@bjorn3
Copy link
Member Author

bjorn3 commented Feb 18, 2017

Yes

@bjorn3 bjorn3 closed this as completed Feb 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants