Skip to content

Commit 64ca988

Browse files
committed
Implement clone for ThemeSet
1 parent 5bb5ef8 commit 64ca988

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/highlighting/theme_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use serde_derive::{Deserialize, Serialize};
66
use std::collections::BTreeMap;
77
use std::path::{Path, PathBuf};
88

9-
#[derive(Debug, Default, Serialize, Deserialize)]
9+
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
1010
pub struct ThemeSet {
1111
// This is a `BTreeMap` because they're faster than hashmaps on small sets
1212
pub themes: BTreeMap<String, Theme>,

tests/public-api.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,8 @@ pub fn syntect::highlighting::ThemeSet::load_from_reader<R: std::io::BufRead + s
491491
pub fn syntect::highlighting::ThemeSet::new() -> syntect::highlighting::ThemeSet
492492
impl syntect::highlighting::ThemeSet
493493
pub fn syntect::highlighting::ThemeSet::load_defaults() -> syntect::highlighting::ThemeSet
494+
impl core::clone::Clone for syntect::highlighting::ThemeSet
495+
pub fn syntect::highlighting::ThemeSet::clone(&self) -> syntect::highlighting::ThemeSet
494496
impl core::default::Default for syntect::highlighting::ThemeSet
495497
pub fn syntect::highlighting::ThemeSet::default() -> syntect::highlighting::ThemeSet
496498
impl core::fmt::Debug for syntect::highlighting::ThemeSet

0 commit comments

Comments
 (0)