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

Added blocks and scopes section #1821

Closed
wants to merge 19 commits into from
Closed

Conversation

mani-chand
Copy link
Contributor

@mani-chand mani-chand commented Feb 16, 2024

#1464 issue PR

mani-chand and others added 18 commits February 15, 2024 22:15
google#324

---------

Co-authored-by: Yihao Wang <[email protected]>
Co-authored-by: Henri F. <[email protected]>
In the details section, it is suggested to adjust the signature of the
nearest function to "lie" about the lifetimes returned to:

fn nearest<'a, 'q'>(points: &'a [Point], query: &'q Point) -> Option<&'q
Point> {

to demonstrate the compiler checks lifetimes for validity. However, the
syntax for 'q is incorrect and it should instead be

fn nearest<'a, 'q>(points: &'a [Point], query: &'q Point) -> Option<&'q
Point> {
…pdate (google#1808)

Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[chrono](https://github.com/chronotope/chrono).

Updates `chrono` from 0.4.33 to 0.4.34

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the minor group with 2 updates:
[clap](https://github.com/clap-rs/clap) and
[tempfile](https://github.com/Stebalien/tempfile).

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.18.0 to
1.18.2.

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the patch group with 4 updates:
[mdbook](https://github.com/rust-lang/mdBook),
[thiserror](https://github.com/dtolnay/thiserror),
[cxx](https://github.com/dtolnay/cxx) and
[cxx-build](https://github.com/dtolnay/cxx).

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

This
* Works with the GitHub permissions model (at least in local testing on
another temporary repo)
 * Only comments when the timings actually change
Day 2: afternoon (+ miscellaneous updates of previous sections)

Signed-off-by: Andriy Redko <[email protected]>
The word `strings` is repeated unnecessarily
In the example, somebody who is trying to understand this code has to
follow a lot of moving pieces: prefix, name, make_greeter, and then also
learn the new move concept at the same time.

It'd be better if the content were to actually match the name of the
variables. "Hi" is a good prefix, but "there" is not a name, so let's go
with an actual name.
Tested with rust 2015, 2018, 2021 and 2024, on amd64 musl, amd64 glibc
and aarch64 musl, all of them represent Strings with (ptr, capacity,
len).

This is an internal implementation detail, that shouldn't be exposed
anyway, so it's no big deal, but in the speaker notes, we provide a
debugging tool for demonstration purposes, so at least that should have
a correct output.
@mani-chand
Copy link
Contributor Author

Hello @djmitche , I don't why PR is opened like this . I just normally committed the project and opened the PR then this thing happened. Should I close this PR and open another.

@djmitche
Copy link
Collaborator

I think it's because you're making a PR from your main branch. That branch now has a bunch of commits from the break/continue patch in it. I think you will need to create a new PR and close this one.

Here's what I'd suggest:

Get the latest changes from the google repository on github:

$ git fetch google

then reset your main branch to match the google main branch:

$ git checkout main
$ git reset --hard google/main

Now, make a "topic branch" for the blocks and scopes work:

$ git branch blocks-and-scopes
$ git checkout blocks-and-scopes
$ git cherry-pick 6399953

I copied that 6399953 from the "Added Blocks and Scopes section." commit in this PR, and it contains the changes you've made for blocks and scopes.

After that, you can use

$ git push

to push the new blocks-and-scopes branch, and you'll see a nice link to click to create a new PR.

In general (so, next time), begin work by updating your local main branch and then making a topic branch

$ git checkout main
$ git pull google main
$ git branch my-next-project
$ git checkout my-next-project

@mani-chand mani-chand closed this Feb 16, 2024
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.

8 participants