@@ -6,14 +6,16 @@ use std::{
66use assign:: assign;
77use async_stream:: try_stream;
88use futures_core:: stream:: Stream ;
9- use ruma_client_api:: {
10- account:: register:: { self , RegistrationKind } ,
11- session:: login:: { self , v3:: LoginInfo } ,
12- sync:: sync_events,
13- uiaa:: UserIdentifier ,
14- } ;
15- use ruma_common:: {
16- api:: { MatrixVersion , OutgoingRequest , SendAccessToken } ,
9+ use ruma:: {
10+ api:: {
11+ client:: {
12+ account:: register:: { self , RegistrationKind } ,
13+ session:: login:: { self , v3:: LoginInfo } ,
14+ sync:: sync_events,
15+ uiaa:: UserIdentifier ,
16+ } ,
17+ MatrixVersion , OutgoingRequest , SendAccessToken ,
18+ } ,
1719 presence:: PresenceState ,
1820 DeviceId , UserId ,
1921} ;
@@ -117,7 +119,7 @@ impl<C: HttpClient> Client<C> {
117119 password : & str ,
118120 device_id : Option < & DeviceId > ,
119121 initial_device_display_name : Option < & str > ,
120- ) -> Result < login:: v3:: Response , Error < C :: Error , ruma_client_api :: Error > > {
122+ ) -> Result < login:: v3:: Response , Error < C :: Error , ruma :: api :: client :: Error > > {
121123 let login_info = LoginInfo :: Password ( login:: v3:: Password :: new (
122124 UserIdentifier :: UserIdOrLocalpart ( user. to_owned ( ) ) ,
123125 password. to_owned ( ) ,
@@ -140,7 +142,8 @@ impl<C: HttpClient> Client<C> {
140142 /// returned by the endpoint in this client, in addition to returning it.
141143 pub async fn register_guest (
142144 & self ,
143- ) -> Result < register:: v3:: Response , Error < C :: Error , ruma_client_api:: uiaa:: UiaaResponse > > {
145+ ) -> Result < register:: v3:: Response , Error < C :: Error , ruma:: api:: client:: uiaa:: UiaaResponse > >
146+ {
144147 let response = self
145148 . send_request ( assign ! ( register:: v3:: Request :: new( ) , { kind: RegistrationKind :: Guest } ) )
146149 . await ?;
@@ -161,7 +164,8 @@ impl<C: HttpClient> Client<C> {
161164 & self ,
162165 username : Option < & str > ,
163166 password : & str ,
164- ) -> Result < register:: v3:: Response , Error < C :: Error , ruma_client_api:: uiaa:: UiaaResponse > > {
167+ ) -> Result < register:: v3:: Response , Error < C :: Error , ruma:: api:: client:: uiaa:: UiaaResponse > >
168+ {
165169 let response = self
166170 . send_request ( assign ! ( register:: v3:: Request :: new( ) , {
167171 username: username. map( ToOwned :: to_owned) ,
@@ -181,7 +185,7 @@ impl<C: HttpClient> Client<C> {
181185 /// ```no_run
182186 /// use std::time::Duration;
183187 ///
184- /// # use ruma_common ::presence::PresenceState;
188+ /// # use ruma ::presence::PresenceState;
185189 /// # use tokio_stream::{StreamExt as _};
186190 /// # let homeserver_url = "https://example.com".to_owned();
187191 /// # async {
@@ -208,8 +212,9 @@ impl<C: HttpClient> Client<C> {
208212 mut since : String ,
209213 set_presence : PresenceState ,
210214 timeout : Option < Duration > ,
211- ) -> impl Stream < Item = Result < sync_events:: v3:: Response , Error < C :: Error , ruma_client_api:: Error > > >
212- + ' _ {
215+ ) -> impl Stream <
216+ Item = Result < sync_events:: v3:: Response , Error < C :: Error , ruma:: api:: client:: Error > > ,
217+ > + ' _ {
213218 try_stream ! {
214219 loop {
215220 let response = self
0 commit comments