Make some methods/fields public

This commit is contained in:
Damien Elmes 2023-02-19 17:51:51 +10:00
parent 96a606d78c
commit d9d36078f1
3 changed files with 4 additions and 4 deletions

View File

@ -132,7 +132,7 @@ pub struct CollectionState {
}
pub struct Collection {
pub(crate) storage: SqliteStorage,
pub storage: SqliteStorage,
#[allow(dead_code)]
pub(crate) col_path: PathBuf,
pub(crate) media_folder: PathBuf,

View File

@ -158,7 +158,7 @@ impl Collection {
}
impl Collection {
pub(crate) fn get_deck(&mut self, did: DeckId) -> Result<Option<Arc<Deck>>> {
pub fn get_deck(&mut self, did: DeckId) -> Result<Option<Arc<Deck>>> {
if let Some(deck) = self.state.deck_cache.get(&did) {
return Ok(Some(deck.clone()));
}

View File

@ -101,7 +101,7 @@ lazy_static! {
"#
).unwrap();
pub(crate) static ref HTML_MEDIA_TAGS: Regex = Regex::new(
pub static ref HTML_MEDIA_TAGS: Regex = Regex::new(
r#"(?xsi)
# the start of the image, audio, or object tag
<\b(?:img|audio|object)\b[^>]+\b(?:src|data)\b=
@ -284,7 +284,7 @@ pub(crate) fn extract_media_refs(text: &str) -> Vec<MediaRef> {
/// Calls `replacer` for every media reference in `text`, and optionally
/// replaces it with something else. [None] if no reference was found.
pub(crate) fn replace_media_refs(
pub fn replace_media_refs(
text: &str,
mut replacer: impl FnMut(&str) -> Option<String>,
) -> Option<String> {