Spacc BBS Spacc BBS
    • Categorie
    • Recenti
    • Tag
    • Popolare
    • Mondo
    • Utenti
    • Gruppi
    • Registrati
    • Accedi
    La nuova BBS è in fase Alpha. I post precedenti al 22 luglio 2024 potrebbero non essere trasferibili, ma rimarranno disponibili per la lettura su /old/.

    AI would probably be a great resource to help people like me figure out what the fuck is wrong with their Rust.

    Pianificato Fissato Bloccato Spostato Uncategorized
    4 Post 2 Autori 7 Visualizzazioni
    Caricamento altri post
    • Da Vecchi a Nuovi
    • Da Nuovi a Vecchi
    • Più Voti
    Rispondi
    • Topic risposta
    Effettua l'accesso per rispondere
    Questa discussione è stata eliminata. Solo gli utenti con diritti di gestione possono vederla.
    • blake@infosec.townB Questo utente è esterno a questo forum
      blake@infosec.town
      ultima modifica di

      AI would probably be a great resource to help people like me figure out what the fuck is wrong with their Rust.

      related: what the hell is the point of a variable I can't reuse?!

      steffo@a.junimo.partyS 1 Risposta Ultima Risposta Rispondi Cita 0
      • steffo@a.junimo.partyS Questo utente è esterno a questo forum
        steffo@a.junimo.party @blake@infosec.town
        ultima modifica di

        @blake about the related question: references! those can be reused!

        blake@infosec.townB 1 Risposta Ultima Risposta Rispondi Cita 0
        • blake@infosec.townB Questo utente è esterno a questo forum
          blake@infosec.town @steffo@a.junimo.party
          ultima modifica di

          @steffo iirc I couldn't use those because whatever function I was using didn't accept references, it wanted the actual thing. and it modified it, and didn't return it I think?

          steffo@a.junimo.partyS 1 Risposta Ultima Risposta Rispondi Cita 0
          • steffo@a.junimo.partyS Questo utente è esterno a questo forum
            steffo@a.junimo.party @blake@infosec.town
            ultima modifica di

            @blake then it's likely you had to clone the contents of that variable with .clone()

            the function might have performed a computation that transformed the memory layout of that value, preventing it from being used again after the transformation happened

            weird that it didn't return it though

            1 Risposta Ultima Risposta Rispondi Cita 0
            • Primo post
              Ultimo post