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

Change simple code in book #1698

Merged
merged 4 commits into from
Apr 5, 2021
Merged

Change simple code in book #1698

merged 4 commits into from
Apr 5, 2021

Conversation

ccqpein
Copy link
Contributor

@ccqpein ccqpein commented Apr 5, 2021

In Get started with Druid of book, the simple code:

fn main() -> Result<(), PlatformError> {
    AppLauncher::with_window(WindowDesc::new(build_ui)).launch(())?;
    Ok(())
}

doesn't pass the compiler. Change it to:

fn main() -> Result<(), PlatformError> {
    AppLauncher::with_window(WindowDesc::new(build_ui())).launch(())?;
    Ok(())
}

will work

@@ -58,6 +58,8 @@ You can find its changes [documented below](#070---2021-01-01).

### Docs

- Fix example code in `Get started with Druid` chapter of book ([#1698] by [@ccqpein])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to add to the list of links at the bottom of the file for the [#1698] and [@ccqpein] shortcuts to work

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for notifying me, let me change it now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just done. Please check it out.

@SecondFlight
Copy link
Collaborator

SecondFlight commented Apr 5, 2021

Thanks! I'll merge this tomorrow morning if there are no other comments.

@SecondFlight SecondFlight merged commit 5138e8b into linebender:master Apr 5, 2021
@memoryruins
Copy link

This change causes the example code to no longer compile with 0.7, although the book instructs the user to use 0.7 right above the example. New users have ran into this on discord.

I realize users of master branch can run into this without this change #1637, but the book doesn't currently specify using a git version. Should this be reverted?

@SecondFlight
Copy link
Collaborator

Based on this Zulip conversation, I've opened a PR (#1732) to update the book to use the latest git version. This was an oversight when I reviewed this PR. Sorry for the confusion it caused!

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

Successfully merging this pull request may close these issues.

3 participants