Lift 'static restriction on connect methods ()

This commit is contained in:
Rushmore Mushambi 2023-05-05 20:14:06 +02:00 committed by GitHub
parent 107e5b5dba
commit fb6f1caa6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 8 deletions
lib/src/api
engine
any
local
remote
method/tests

View file

@ -256,7 +256,7 @@ impl Surreal<Any> {
/// # Ok(())
/// # }
/// ```
pub fn connect(&'static self, address: impl IntoEndpoint) -> Connect<Any, ()> {
pub fn connect(&self, address: impl IntoEndpoint) -> Connect<Any, ()> {
Connect {
router: Some(&self.router),
address: address.into_endpoint(),

View file

@ -312,10 +312,7 @@ pub struct Db {
impl Surreal<Db> {
/// Connects to a specific database endpoint, saving the connection on the static client
pub fn connect<P>(
&'static self,
address: impl IntoEndpoint<P, Client = Db>,
) -> Connect<Db, ()> {
pub fn connect<P>(&self, address: impl IntoEndpoint<P, Client = Db>) -> Connect<Db, ()> {
Connect {
router: Some(&self.router),
address: address.into_endpoint(),

View file

@ -89,7 +89,7 @@ impl Surreal<Client> {
/// # }
/// ```
pub fn connect<P>(
&'static self,
&self,
address: impl IntoEndpoint<P, Client = Client>,
) -> Connect<Client, ()> {
Connect {

View file

@ -72,7 +72,7 @@ impl Surreal<Client> {
/// # }
/// ```
pub fn connect<P>(
&'static self,
&self,
address: impl IntoEndpoint<P, Client = Client>,
) -> Connect<Client, ()> {
Connect {

View file

@ -44,7 +44,7 @@ pub struct Client {
impl Surreal<Client> {
pub fn connect<P>(
&'static self,
&self,
address: impl IntoEndpoint<P, Client = Client>,
) -> Connect<Client, ()> {
Connect {