8 Matching Annotations
  1. Nov 2021
    1. call works with any lifetime &self happens to have at that point.

      Do not understand this.

    1. You might see suggestions to use the 'static lifetime in error messages. But before specifying 'static as the lifetime for a reference, think about whether the reference you have actually lives the entire lifetime of your program or not. You might consider whether you want it to live that long, even if it could. Most of the time, the problem results from attempting to create a dangling reference or a mismatch of the available lifetimes. In such cases, the solution is fixing those problems, not specifying the 'static lifetime.
  2. Aug 2021
  3. Feb 2020
    1. rooted him on

      to help (someone or something) to win or succeed by expressing or showing strong support

  4. Oct 2018
    1. It is useful when wishing to abstract over the type of reference (&T, &mut T) or allow both the referenced and owned type to be treated in the same manner.

      What is "it" refer to in this sentence?

  5. Mar 2018
    1. Note that we change the pokemon object after creating the closure, still when the closure executes 1 second later (while we already exited the scope of the demo2() function), we print the new pokemon, not the old one! That’s because Swift captures variables by reference by default

      Intersting.

  6. Feb 2018
    1. Take special note that the interfaces are packaged together with the higher-level components and are defined in terms of the higher-level component’s needs, not the lower-level component’s behavior.

      Describe the higher-level component's behavior.

  7. Mar 2017