title: How to fix String field does not implement `Copy`?
body: <p>I am building a simple command-line todo app in Rust. If I don't implement the copy trait I get this error: &quot;move occurs because 'todo' has type 'todo::Todo', which does not implement the 'Copy' trait&quot;. When I try to implement the Copy trait for my Todo struct, I receive the following error: &quot;field text: String does not implement the Copy trait&quot;. How do I fix this error? My code is below:</p>
  <pre class="lang-rust prettyprint-override"><code>pub type todo_type = Vec&lt;Todo&gt;;
  
  #[derive(Copy)]
  pub struct Todo {
      id: usize,
      text: String,
      completed: bool,
  }
  
  impl Todo {
      pub fn new(text: String, id: usize) -&gt; Todo {
          Todo {
              text,
              id,
              completed: false,
          }
      }
  }
  
  pub struct Todos {
      todos: todo_type,
  }
  
  impl Todos {
      pub fn new(todos: todo_type) -&gt; Todos {
          Todos { todos }
      }
  
      pub fn get_all_todos(self) -&gt; todo_type {
          self.todos
      }
  
      pub fn get_single_todo(self, todo_index: usize) -&gt; Todo {
          unimplemented!()
      }
  
      pub fn add_todo(self, text: String) -&gt; Todo {
          let id: usize = 1;
  
          if self.todos.len() == 0 {
              let id = 1;
          } else {
              let last_todo = match self.todos.len() {
                  0 =&gt; None,
                  n =&gt; Some(&amp;self.todos[n - 1]),
              };
              let id = last_todo.unwrap().id;
          }
  
          let todo = Todo::new(text, id);
          self.todos.push(todo);
  
          todo
      }
  
      pub fn remove_todo(self, todo_index: usize) -&gt; bool {
          self.todos.remove(todo_index);
  
          true
      }
  }
  
  </code></pre>