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

Document usage without crate's cache file #143

Closed
Enyium opened this issue Aug 23, 2024 · 3 comments · Fixed by #146
Closed

Document usage without crate's cache file #143

Enyium opened this issue Aug 23, 2024 · 3 comments · Fixed by #146
Labels
dependencies Pull requests that update a dependency file good first issue Good for newcomers

Comments

@Enyium
Copy link
Contributor

Enyium commented Aug 23, 2024

My GUI app uses its own JSON config file to keep track of whether an update check should be performed. According to my understanding of the following code snippet, calling update_informer::new(...).interval(Duration::ZERO) is the way to achieve this:

        // If the interval is zero, don't use the cache file
        let latest_version = if self.interval.is_zero() {
            match R::get_latest_version(client, &pkg)? {
                Some(v) => v,
                None => return Ok(None),
            }
        } else {

But this isn't documented. Could you please document this usage as a way to completely avoid that the crate does anything on the file system, if I understood this correctly?

BTW: The docs text on interval() says: "An interval in seconds." But it's a Duration, which isn't a second value per se.

Copy link

github-actions bot commented Sep 7, 2024

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Sep 7, 2024
@Enyium
Copy link
Contributor Author

Enyium commented Sep 7, 2024

@mgrachev, please react.

@github-actions github-actions bot removed the stale label Sep 8, 2024
@mgrachev
Copy link
Owner

mgrachev commented Sep 9, 2024

@Enyium 👋 Thank you for your feedback!

Any PR to improve the documentation is welcome 😊

@mgrachev mgrachev added good first issue Good for newcomers dependencies Pull requests that update a dependency file labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants