killercup / scribbles

Some notes on various topics.
https://deterministic.space
64 stars 11 forks source link

Minor issue in code example #47

Closed tfheen closed 2 years ago

tfheen commented 2 years ago

Hi,

On https://deterministic.space/elegant-apis-in-rust.html, it looks like there's a small issue with a code example near the end:

let p: OpenPackage = Package::new();
let p: OpenPackage = package.insert([stuff, padding, padding]);

let p: ClosedPackage = package.seal_up();

// let p: OpenPackage = package.insert([more_stuff]);
//~^ ERROR: No method named `insert` on `ClosedPackage`

let p: DeliveryTracking = package.send(address, postage);

I think all the let p: … bits should be let package: …, shouldn't they?

killercup commented 2 years ago

Thanks! Will fix this momentarily :)