[gnome-maps/wip/mlundblad/es6-modules: 8/25] graphHopperGeocode: Use string templates instead of imports.format
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/es6-modules: 8/25] graphHopperGeocode: Use string templates instead of imports.format
- Date: Fri, 27 May 2022 19:48:22 +0000 (UTC)
commit eb4a1cab707a270a5fb0f27d09528576541b66b3
Author: Marcus Lundblad <ml dfupdate se>
Date: Mon May 23 23:14:38 2022 +0200
graphHopperGeocode: Use string templates instead of imports.format
imports.format is deprecated. Use ES string templates instead.
src/graphHopperGeocode.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/graphHopperGeocode.js b/src/graphHopperGeocode.js
index b74142c3..ebd06aad 100644
--- a/src/graphHopperGeocode.js
+++ b/src/graphHopperGeocode.js
@@ -19,8 +19,6 @@
* Author: Marcus Lundblad <ml update uu se>
*/
-const Format = imports.format;
-
import GLib from 'gi://GLib';
import Soup from 'gi://Soup';
@@ -149,8 +147,7 @@ export class GraphHopperGeocode {
else
query.add('reverse', 'true');
- return Format.vprintf('%s/api/1/geocode?%s', [this._baseUrl,
- query.toString()]);
+ return `${this._baseUrl}/api/1/geocode?${query.toString()}`;
}
_readService() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]