'url_starts_with' replace with 'is_prefix_of' method

This commit is contained in:
baoyachi 2021-09-27 16:45:25 +08:00
parent d78a067b2d
commit 8d69b034a0

View File

@ -129,7 +129,7 @@ impl DatabaseConnection {
}
impl DbBackend {
pub(crate) fn is_prefix_of(self, base_url: &str) -> bool {
pub fn is_prefix_of(self, base_url: &str) -> bool {
match self {
Self::Postgres => {
base_url.starts_with("postgres://") || base_url.starts_with("postgresql://")