Skip to content

Commit

Permalink
refactor!: Rename with_extension_path to with_extensions_path (#1423
Browse files Browse the repository at this point in the history
)
  • Loading branch information
SpikeHD authored Nov 20, 2024
1 parent e38c5bc commit eb0c816
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changes/extension_path_rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": "minor"
---

Rename `{WebViewBuilderExtWindows, WebViewBuilderExtUnix}::with_extension_path` to `with_extensions_path`.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ pub trait WebViewBuilderExtWindows {
/// Set the path from which to load extensions from. Extensions stored in this path should be unpacked.
///
/// Does nothing if browser extensions are disabled. See [`with_browser_extensions_enabled`](Self::with_browser_extensions_enabled)
fn with_extension_path(self, path: impl Into<PathBuf>) -> Self;
fn with_extensions_path(self, path: impl Into<PathBuf>) -> Self;
}

#[cfg(windows)]
Expand Down Expand Up @@ -1349,7 +1349,7 @@ impl WebViewBuilderExtWindows for WebViewBuilder<'_> {
})
}

fn with_extension_path(self, path: impl Into<PathBuf>) -> Self {
fn with_extensions_path(self, path: impl Into<PathBuf>) -> Self {
self.and_then(|mut b| {
b.platform_specific.extension_path = Some(path.into());
Ok(b)
Expand Down Expand Up @@ -1469,7 +1469,7 @@ pub trait WebViewBuilderExtUnix<'a> {
W: gtk::prelude::IsA<gtk::Container>;

/// Set the path from which to load extensions from.
fn with_extension_path(self, path: impl Into<PathBuf>) -> Self;
fn with_extensions_path(self, path: impl Into<PathBuf>) -> Self;
}

#[cfg(any(
Expand All @@ -1490,7 +1490,7 @@ impl<'a> WebViewBuilderExtUnix<'a> for WebViewBuilder<'a> {
.map(|webview| WebView { webview })
}

fn with_extension_path(self, path: impl Into<PathBuf>) -> Self {
fn with_extensions_path(self, path: impl Into<PathBuf>) -> Self {
self.and_then(|mut b| {
b.platform_specific.extension_path = Some(path.into());
Ok(b)
Expand Down

0 comments on commit eb0c816

Please sign in to comment.