File tree 1 file changed +7
-4
lines changed
crates/matrix-sdk/src/event_cache 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- use std:: { fmt, iter:: once, result :: Result } ;
15
+ use std:: { fmt, iter:: once} ;
16
16
17
17
use matrix_sdk_common:: deserialized_responses:: SyncTimelineEvent ;
18
18
@@ -103,16 +103,19 @@ impl RoomEvents {
103
103
///
104
104
/// Because the `gap_identifier` can represent non-gap chunk, this method
105
105
/// returns a `Result`.
106
+ ///
107
+ /// The returned `Chunk` represents the newly created `Chunk` that contains
108
+ /// the first events.
106
109
pub fn replace_gap_at < I > (
107
110
& mut self ,
108
- items : I ,
111
+ events : I ,
109
112
gap_identifier : ChunkIdentifier ,
110
- ) -> Result < ( ) , LinkedChunkError >
113
+ ) -> Result < & Chunk < SyncTimelineEvent , Gap , DEFAULT_CHUNK_CAPACITY > , LinkedChunkError >
111
114
where
112
115
I : IntoIterator < Item = SyncTimelineEvent > ,
113
116
I :: IntoIter : ExactSizeIterator ,
114
117
{
115
- self . chunks . replace_gap_at ( items , gap_identifier)
118
+ self . chunks . replace_gap_at ( events , gap_identifier)
116
119
}
117
120
118
121
/// Search for a chunk, and return its identifier.
You can’t perform that action at this time.
0 commit comments