@@ -319,20 +319,24 @@ impl Editor {
319319 view.ensure_cursor_in_view(doc, self.config.scrolloff)
320320 }
321321
322+ #[inline]
322323 pub fn document(&self, id: DocumentId) -> Option<&Document> {
323324 self.documents.get(id)
324325 }
325326
327+ #[inline]
326328 pub fn document_mut(&mut self, id: DocumentId) -> Option<&mut Document> {
327329 self.documents.get_mut(id)
328330 }
329331
332+ #[inline]
330333 pub fn documents(&self) -> impl Iterator<Item = &Document> {
331− self.documents.iter().map(|(_id, doc)| doc)
334+ self.documents.values()
332335 }
333336
337+ #[inline]
334338 pub fn documents_mut(&mut self) -> impl Iterator<Item = &mut Document> {
335− self.documents.iter_mut().map(|(_id, doc)| doc)
339+ self.documents.values_mut()
336340 }
337341
338342 pub fn document_by_path<P: AsRef<Path>>(&self, path: P) -> Option<&Document> {