Skip to content

Commit

Permalink
Fix Container2 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kingosticks authored and cmyr committed Nov 4, 2021
1 parent 0c0851f commit f8e9c75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/lens.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ struct Name {
struct NameLens;

impl Lens<Container2, Name> for NameLens {
fn with<F: FnOnce(&Name)>(&self, data: &Container, f: F) {
fn with<F: FnOnce(&Name)>(&self, data: &Container2, f: F) {
let first = data.first_name.clone();
let last = data.last_name.clone();
f(&Name { first, last });
}

fn with_mut<F: FnOnce(&mut Name)>(&self, data: &mut Container, f: F) {
fn with_mut<F: FnOnce(&mut Name)>(&self, data: &mut Container2, f: F) {
let first = data.first_name.clone();
let last = data.last_name.clone();
let mut name = Name { first, last };
Expand Down

0 comments on commit f8e9c75

Please sign in to comment.